CMS 3D CMS Logo

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

#include <EcalSelectiveReadoutProducer.h>

Inheritance diagram for EcalSelectiveReadoutProducer:
edm::one::EDProducer<> edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 EcalSelectiveReadoutProducer (const edm::ParameterSet &params)
 
void produce (edm::Event &event, const edm::EventSetup &eventSetup) override
 
 ~EcalSelectiveReadoutProducer () override
 
- Public Member Functions inherited from edm::one::EDProducer<>
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- 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 ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
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, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
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::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
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 EBDigiCollectiongetEBDigis (edm::Event &event)
 
const EEDigiCollectiongetEEDigis (edm::Event &event)
 
const EcalTrigPrimDigiCollectiongetTrigPrims (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< EBDigiCollectionEB_token
 
std::string ebdigiCollection_
 
std::string ebSrFlagCollection_
 
std::string ebSRPdigiCollection_
 
edm::EDGetTokenT< EcalTrigPrimDigiCollectionEcTP_token
 
edm::EDGetTokenT< EEDigiCollectionEE_token
 
std::string eedigiCollection_
 
edm::ESGetToken< EcalElectronicsMapping, EcalMappingRcdeElecmap_token_
 
std::string eeSrFlagCollection_
 
std::string eeSRPdigiCollection_
 
edm::ESGetToken< EcalTrigTowerConstituentsMap, IdealGeometryRecordeTTmap_token_
 
bool firstCallEB_
 
bool firstCallEE_
 
edm::ESGetToken< CaloGeometry, CaloGeometryRecordgeom_token_
 
edm::ESGetToken< EcalSRSettings, EcalSRSettingsRcdhSr_token_
 
int iEvent_
 
edm::ParameterSet params_
 
bool produceDigis_
 
const EcalSRSettingssettings_
 
std::unique_ptr< EcalSRSettingssettingsFromFile_
 
std::unique_ptr< EcalSelectiveReadoutSuppressorsuppressor_
 
const EcalElectronicsMappingtheElecMap
 
const CaloGeometrytheGeometry
 
const EcalTrigTowerConstituentsMaptheTriggerTowerMap
 
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
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Member Functions inherited from edm::ProducerBase
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Definition at line 18 of file EcalSelectiveReadoutProducer.h.

Constructor & Destructor Documentation

◆ EcalSelectiveReadoutProducer()

EcalSelectiveReadoutProducer::EcalSelectiveReadoutProducer ( const edm::ParameterSet params)
explicit

Constructor

Parameters
paramsseletive readout parameters

Definition at line 19 of file EcalSelectiveReadoutProducer.cc.

20  : params_(params), firstCallEB_(true), firstCallEE_(true), iEvent_(1) {
21  //settings:
22  // settings which are only in python config files:
23  digiProducer_ = params.getParameter<string>("digiProducer");
24  ebdigiCollection_ = params.getParameter<std::string>("EBdigiCollection");
25  eedigiCollection_ = params.getParameter<std::string>("EEdigiCollection");
26  ebSRPdigiCollection_ = params.getParameter<std::string>("EBSRPdigiCollection");
27  eeSRPdigiCollection_ = params.getParameter<std::string>("EESRPdigiCollection");
28  ebSrFlagCollection_ = params.getParameter<std::string>("EBSrFlagCollection");
29  eeSrFlagCollection_ = params.getParameter<std::string>("EESrFlagCollection");
30  trigPrimProducer_ = params.getParameter<string>("trigPrimProducer");
31  trigPrimCollection_ = params.getParameter<string>("trigPrimCollection");
32  trigPrimBypass_ = params.getParameter<bool>("trigPrimBypass");
33  trigPrimBypassMode_ = params.getParameter<int>("trigPrimBypassMode");
34  dumpFlags_ = params.getUntrackedParameter<int>("dumpFlags", 0);
35  writeSrFlags_ = params.getUntrackedParameter<bool>("writeSrFlags", false);
36  produceDigis_ = params.getUntrackedParameter<bool>("produceDigis", true);
37  // settings which can come from either condition database or python configuration file:
38  useCondDb_ = false;
39  try {
40  if (params.getParameter<bool>("configFromCondDB")) {
41  useCondDb_ = true;
42  }
43  } catch (cms::Exception const&) {
44  /* pameter not found */
45  edm::LogWarning("EcalSelectiveReadout") << "Parameter configFromCondDB of EcalSelectiveReadout module not found. "
46  "Selective readout configuration will be read from python file.";
47  }
48  if (!useCondDb_) {
49  settingsFromFile_ = std::make_unique<EcalSRSettings>();
52  }
53 
54  //declares the products made by this producer:
55  if (produceDigis_) {
56  produces<EBDigiCollection>(ebSRPdigiCollection_);
57  produces<EEDigiCollection>(eeSRPdigiCollection_);
58  }
59 
60  if (writeSrFlags_) {
61  produces<EBSrFlagCollection>(ebSrFlagCollection_);
62  produces<EESrFlagCollection>(eeSrFlagCollection_);
63  }
64 
65  useFullReadout_ = false;
66  useFullReadout_ = params.getParameter<bool>("UseFullReadout");
67 
68  theGeometry = nullptr;
69  theTriggerTowerMap = nullptr;
70  theElecMap = nullptr;
71 
72  EB_token = consumes<EBDigiCollection>(edm::InputTag(digiProducer_, ebdigiCollection_));
73  EE_token = consumes<EEDigiCollection>(edm::InputTag(digiProducer_, eedigiCollection_));
74  ;
75  EcTP_token = consumes<EcalTrigPrimDigiCollection>(edm::InputTag(trigPrimProducer_, trigPrimCollection_));
76  if (useFullReadout_) {
77  hSr_token_ = esConsumes<EcalSRSettings, EcalSRSettingsRcd>(edm::ESInputTag("", "fullReadout"));
78  } else {
79  hSr_token_ = esConsumes<EcalSRSettings, EcalSRSettingsRcd>();
80  }
81  geom_token_ = esConsumes<CaloGeometry, CaloGeometryRecord>();
82  eTTmap_token_ = esConsumes<EcalTrigTowerConstituentsMap, IdealGeometryRecord>();
83  eElecmap_token_ = esConsumes<EcalElectronicsMapping, EcalMappingRcd>();
84  ;
85 }

References digiProducer_, dumpFlags_, EB_token, ebdigiCollection_, ebSrFlagCollection_, ebSRPdigiCollection_, EcTP_token, EE_token, eedigiCollection_, eElecmap_token_, eeSrFlagCollection_, eeSRPdigiCollection_, eTTmap_token_, geom_token_, hSr_token_, EcalSRCondTools::importParameterSet(), CalibrationSummaryClient_cfi::params, produceDigis_, settings_, settingsFromFile_, AlCaHLTBitMon_QueryRunRegistry::string, theElecMap, theGeometry, theTriggerTowerMap, trigPrimBypass_, trigPrimBypassMode_, trigPrimCollection_, trigPrimProducer_, useCondDb_, useFullReadout_, and writeSrFlags_.

◆ ~EcalSelectiveReadoutProducer()

EcalSelectiveReadoutProducer::~EcalSelectiveReadoutProducer ( )
override

Destructor

Definition at line 87 of file EcalSelectiveReadoutProducer.cc.

87 {}

Member Function Documentation

◆ checkElecMap()

void EcalSelectiveReadoutProducer::checkElecMap ( const edm::EventSetup eventSetup)
private

Definition at line 234 of file EcalSelectiveReadoutProducer.cc.

234  {
236 
237  const EcalElectronicsMapping* pMap = &*eElecmap;
238 
239  // see if we need to update
240  if (pMap != theElecMap) {
241  theElecMap = pMap;
242  suppressor_->setElecMap(theElecMap);
243  }
244 }

References eElecmap_token_, edm::EventSetup::getHandle(), suppressor_, and theElecMap.

Referenced by produce().

◆ checkGeometry()

void EcalSelectiveReadoutProducer::checkGeometry ( const edm::EventSetup eventSetup)
private

call these once an event, to make sure everything is up-to-date

Definition at line 210 of file EcalSelectiveReadoutProducer.cc.

210  {
211  edm::ESHandle<CaloGeometry> hGeometry = eventSetup.getHandle(geom_token_);
212 
213  const CaloGeometry* pGeometry = &*hGeometry;
214 
215  // see if we need to update
216  if (pGeometry != theGeometry) {
217  theGeometry = pGeometry;
218  suppressor_->setGeometry(theGeometry);
219  }
220 }

References geom_token_, edm::EventSetup::getHandle(), suppressor_, and theGeometry.

Referenced by produce().

◆ checkTriggerMap()

void EcalSelectiveReadoutProducer::checkTriggerMap ( const edm::EventSetup eventSetup)
private

Definition at line 222 of file EcalSelectiveReadoutProducer.cc.

222  {
224 
225  const EcalTrigTowerConstituentsMap* pMap = &*eTTmap;
226 
227  // see if we need to update
228  if (pMap != theTriggerTowerMap) {
229  theTriggerTowerMap = pMap;
230  suppressor_->setTriggerMap(theTriggerTowerMap);
231  }
232 }

References eTTmap_token_, edm::EventSetup::getHandle(), suppressor_, and theTriggerTowerMap.

Referenced by produce().

◆ checkValidity()

void EcalSelectiveReadoutProducer::checkValidity ( const EcalSRSettings settings)
staticprivate

Checks validity of selective setting object is valid to be used for MC, especially checks the number of elements in the vectors

Parameters
forEmulatorif true check the restriction that applies for EcalSelectiveReadoutProducer
Exceptions
cms::Exceptionif the setting is not valid.

Definition at line 495 of file EcalSelectiveReadoutProducer.cc.

495  {
496  if (settings.dccNormalizedWeights_.size() != 1) {
497  throw cms::Exception("Configuration")
498  << "Selective readout emulator, EcalSelectiveReadout, supports only single set of ZS weights. "
499  "while the configuration contains "
500  << settings.dccNormalizedWeights_.size() << " set(s)\n";
501  }
502 
503  // if(settings.dccNormalizedWeights_.size() != 1
504  // && settings.dccNormalizedWeights_.size() != 2
505  // && settings.dccNormalizedWeights_.size() != 54
506  // && settings.dccNormalizedWeights_.size() != 75848){
507  // throw cms::Exception("Configuration") << "Invalid number of DCC weight set (" << settings.dccNormalizedWeights_.size()
508  // << ") in condition object EcalSRSetting::dccNormalizedWeights_. "
509  // << "Valid counts are: 1 (single set), 2 (EB and EE), 54 (one per DCC) and 75848 "
510  // "(one per crystal)\n";
511  // }
512 
513  if (settings.dccNormalizedWeights_.size() != settings.ecalDccZs1stSample_.size()) {
514  throw cms::Exception("Configuration")
515  << "Inconsistency between number of weigth sets (" << settings.dccNormalizedWeights_.size() << ") and "
516  << "number of ecalDccZs1Sample values (" << settings.ecalDccZs1stSample_.size() << ").";
517  }
518 }

References EcalSRSettings::dccNormalizedWeights_, EcalSRSettings::ecalDccZs1stSample_, and Exception.

Referenced by produce().

◆ checkWeights()

void EcalSelectiveReadoutProducer::checkWeights ( const edm::Event evt,
const edm::ProductID noZSDigiId 
) const
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 291 of file EcalSelectiveReadoutProducer.cc.

291  {
292  const vector<float>& weights =
293  settings_->dccNormalizedWeights_[0]; //params_.getParameter<vector<double> >("dccNormalizedWeights");
295  static std::atomic<bool> warnWeightCnt{true};
296  bool expected = true;
297  if ((int)weights.size() > nFIRTaps &&
298  warnWeightCnt.compare_exchange_strong(expected, false, std::memory_order_acq_rel)) {
299  edm::LogWarning("Configuration") << "The list of DCC zero suppression FIR "
300  "weights given in parameter dccNormalizedWeights is longer "
301  "than the expected depth of the FIR filter :("
302  << nFIRTaps
303  << "). "
304  "The last weights will be discarded.";
305  }
306 
307  if (!weights.empty()) {
308  int iMaxWeight = 0;
309  double maxWeight = weights[iMaxWeight];
310  //looks for index of maximum weight
311  for (unsigned i = 0; i < weights.size(); ++i) {
312  if (weights[i] > maxWeight) {
313  iMaxWeight = i;
314  maxWeight = weights[iMaxWeight];
315  }
316  }
317 
318  //position of time sample whose maximum weight is applied:
319  int maxWeightBin = settings_->ecalDccZs1stSample_[0] //params_.getParameter<int>("ecalDccZs1stSample")
320  + iMaxWeight;
321 
322  //gets the bin of maximum (in case of raw data it will not exist)
323  int binOfMax = 0;
324  bool rc = getBinOfMax(evt, noZsDigiId, binOfMax);
325 
326  if (rc && maxWeightBin != binOfMax) {
327  edm::LogWarning("Configuration") << "The maximum weight of DCC zero suppression FIR filter is not "
328  "applied to the expected maximum sample("
329  << binOfMax
330  << (binOfMax == 1 ? "st"
331  : (binOfMax == 2 ? "nd" : (binOfMax == 3 ? "rd" : "th")))
332  << " time sample). This may indicate faulty 'dccNormalizedWeights' "
333  "or 'ecalDccZs1sSample' parameters.";
334  }
335  }
336 }

References EcalSRSettings::dccNormalizedWeights_, EcalSRSettings::ecalDccZs1stSample_, getBinOfMax(), EcalSelectiveReadoutSuppressor::getFIRTapCount(), mps_fire::i, settings_, and HLT_FULL_cff::weights.

Referenced by getEBDigis(), and getEEDigis().

◆ getBinOfMax()

bool EcalSelectiveReadoutProducer::getBinOfMax ( const edm::Event evt,
const edm::ProductID noZsDigiId,
int &  binOfMax 
) const
private

Gets the value of the digitizer binOfMaximum parameter.

Parameters
noZsDigiIdproduct ID of the non-suppressed digis
binOfMax[out] set the parameter value if found
Returns
true on success, false otherwise

Definition at line 338 of file EcalSelectiveReadoutProducer.cc.

340  {
341  bool rc;
342  const edm::StableProvenance& p = evt.getStableProvenance(noZsDigiId);
344  vector<string> ebDigiParamList = result.getParameterNames();
345  string bofm("binOfMaximum");
346  if (find(ebDigiParamList.begin(), ebDigiParamList.end(), bofm) != ebDigiParamList.end()) { //bofm found
347  binOfMax = result.getParameter<int>("binOfMaximum");
348  rc = true;
349  } else {
350  rc = false;
351  }
352  return rc;
353 }

References spr::find(), edm::Event::getStableProvenance(), AlCaHLTBitMon_ParallelJobs::p, edm::parameterSet(), edm::Event::processHistory(), and mps_fire::result.

Referenced by checkWeights().

◆ getEBDigis()

const EBDigiCollection * EcalSelectiveReadoutProducer::getEBDigis ( edm::Event event)
private

Definition at line 178 of file EcalSelectiveReadoutProducer.cc.

178  {
180  event.getByToken(EB_token, hEBDigis);
181  //product() method is called before id() in order to get an exception
182  //if the handle is not available (check not done by id() method).
183  const EBDigiCollection* result = hEBDigis.product();
184  if (firstCallEB_) {
185  checkWeights(event, hEBDigis.id());
186  firstCallEB_ = false;
187  }
188  return result;
189 }

References checkWeights(), EB_token, firstCallEB_, edm::HandleBase::id(), edm::Handle< T >::product(), and mps_fire::result.

Referenced by produce().

◆ getEEDigis()

const EEDigiCollection * EcalSelectiveReadoutProducer::getEEDigis ( edm::Event event)
private

Definition at line 191 of file EcalSelectiveReadoutProducer.cc.

191  {
193  event.getByToken(EE_token, hEEDigis);
194  //product() method is called before id() in order to get an exception
195  //if the handle is not available (check not done by id() method).
196  const EEDigiCollection* result = hEEDigis.product();
197  if (firstCallEE_) {
198  checkWeights(event, hEEDigis.id());
199  firstCallEE_ = false;
200  }
201  return result;
202 }

References checkWeights(), EE_token, firstCallEE_, edm::HandleBase::id(), edm::Handle< T >::product(), and mps_fire::result.

Referenced by produce().

◆ getTrigPrims()

const EcalTrigPrimDigiCollection * EcalSelectiveReadoutProducer::getTrigPrims ( edm::Event event) const
private

Definition at line 204 of file EcalSelectiveReadoutProducer.cc.

204  {
206  event.getByToken(EcTP_token, hTPDigis);
207  return hTPDigis.product();
208 }

References EcTP_token, and edm::Handle< T >::product().

Referenced by produce().

◆ printSrFlags()

void EcalSelectiveReadoutProducer::printSrFlags ( std::ostream &  os,
const EBSrFlagCollection ebSrFlags,
const EESrFlagCollection eeSrFlags,
int  iEvent = -1,
bool  withHeader = true 
)
static

Help function to print SR flags.

Parameters
ebSrFlagsthe action flags of EB
eeSrFlagthe action flags of EE
iEventevent number. Ignored if <0.
withHeader,iftrue an output description is written out as header.

Definition at line 355 of file EcalSelectiveReadoutProducer.cc.

359  {
360  const char srpFlagMarker[] = {'.', 'z', 'Z', 'F', '4', '5', '6', '7'};
361  if (withHeader) {
362  time_t t;
363  time(&t);
364  const char* date = ctime(&t);
365  os << "#SRP flag map\n#\n"
366  "# Generatied on: "
367  << date
368  << "\n#\n"
369  "# +-->Phi/Y "
370  << srpFlagMarker[0]
371  << ": suppressed\n"
372  "# | "
373  << srpFlagMarker[1]
374  << ": ZS 1\n"
375  "# | "
376  << srpFlagMarker[2]
377  << ": ZS 2\n"
378  "# V Eta/X "
379  << srpFlagMarker[3]
380  << ": full readout\n"
381  "#\n";
382  }
383 
384  //EE-,EB,EE+ map wil be written onto file in following format:
385  //
386  // 72
387  // <-------------->
388  // 20
389  // <--->
390  // EEE A +-----> Y
391  // EEEEE | |
392  // EE EE | 20 EE- |
393  // EEEEE | |
394  // EEE V V X
395  // BBBBBBBBBBBBBBBBB A
396  // BBBBBBBBBBBBBBBBB | +-----> Phi
397  // BBBBBBBBBBBBBBBBB | |
398  // BBBBBBBBBBBBBBBBB | 34 EB |
399  // BBBBBBBBBBBBBBBBB | |
400  // BBBBBBBBBBBBBBBBB | V Eta
401  // BBBBBBBBBBBBBBBBB |
402  // BBBBBBBBBBBBBBBBB |
403  // BBBBBBBBBBBBBBBBB V
404  // EEE A +-----> Y
405  // EEEEE | |
406  // EE EE | 20 EE+ |
407  // EEEEE | |
408  // EEE V V X
409  //
410  //
411  //
412  //
413  //event header:
414  if (iEvent >= 0) {
415  os << "# Event " << iEvent << "\n";
416  }
417 
418  //retrieve flags:
419  const int nEndcaps = 2;
420  const int nScX = 20;
421  const int nScY = 20;
422  int eeSrf[nEndcaps][nScX][nScY];
423  for (size_t i = 0; i < sizeof(eeSrf) / sizeof(int); ((int*)eeSrf)[i++] = -1) {
424  };
425  for (EESrFlagCollection::const_iterator it = eeSrFlags.begin(); it != eeSrFlags.end(); ++it) {
426  const EESrFlag& flag = *it;
427  int iZ0 = flag.id().zside() > 0 ? 1 : 0;
428  int iX0 = flag.id().ix() - 1;
429  int iY0 = flag.id().iy() - 1;
430  assert(iZ0 >= 0 && iZ0 < nEndcaps);
431  assert(iX0 >= 0 && iX0 < nScX);
432  assert(iY0 >= 0 && iY0 < nScY);
433  eeSrf[iZ0][iX0][iY0] = flag.value();
434  }
435  const int nEbTtEta = 34;
436  const int nEeTtEta = 11;
437  const int nTtEta = nEeTtEta * 2 + nEbTtEta;
438  const int nTtPhi = 72;
439  int ebSrf[nEbTtEta][nTtPhi];
440  for (size_t i = 0; i < sizeof(ebSrf) / sizeof(int); ((int*)ebSrf)[i++] = -1) {
441  };
442  for (EBSrFlagCollection::const_iterator it = ebSrFlags.begin(); it != ebSrFlags.end(); ++it) {
443  const EBSrFlag& flag = *it;
444  int iEta = flag.id().ieta();
445  int iEta0 = iEta + nTtEta / 2 - (iEta >= 0 ? 1 : 0); //0->55 from eta=-3 to eta=3
446  int iEbEta0 = iEta0 - nEeTtEta; //0->33 from eta=-1.48 to eta=1.48
447  int iPhi0 = flag.id().iphi() - 1;
448  assert(iEbEta0 >= 0 && iEbEta0 < nEbTtEta);
449  assert(iPhi0 >= 0 && iPhi0 < nTtPhi);
450 
451  // cout << __FILE__ << ":" << __LINE__ << ": "
452  // << iEta << "\t" << flag.id().iphi() << " -> "
453  // << iEbEta0 << "\t" << iPhi0
454  // << "... Flag: " << flag.value() << "\n";
455 
456  ebSrf[iEbEta0][iPhi0] = flag.value();
457  }
458 
459  //print flags:
460 
461  //EE-
462  for (int iX0 = 0; iX0 < nScX; ++iX0) {
463  for (int iY0 = 0; iY0 < nScY; ++iY0) {
464  int srFlag = eeSrf[0][iX0][iY0];
465  assert(srFlag >= -1 && srFlag < (int)(sizeof(srpFlagMarker) / sizeof(srpFlagMarker[0])));
466  os << (srFlag == -1 ? ' ' : srpFlagMarker[srFlag]);
467  }
468  os << "\n"; //one Y supercystal column per line
469  } //next supercrystal X-index
470 
471  //EB
472  for (int iEta0 = 0; iEta0 < nEbTtEta; ++iEta0) {
473  for (int iPhi0 = 0; iPhi0 < nTtPhi; ++iPhi0) {
474  int srFlag = ebSrf[iEta0][iPhi0];
475  assert(srFlag >= -1 && srFlag < (int)(sizeof(srpFlagMarker) / sizeof(srpFlagMarker[0])));
476  os << (srFlag == -1 ? '?' : srpFlagMarker[srFlag]);
477  }
478  os << "\n"; //one phi per line
479  }
480 
481  //EE+
482  for (int iX0 = 0; iX0 < nScX; ++iX0) {
483  for (int iY0 = 0; iY0 < nScY; ++iY0) {
484  int srFlag = eeSrf[1][iX0][iY0];
485  assert(srFlag >= -1 && srFlag < (int)(sizeof(srpFlagMarker) / sizeof(srpFlagMarker[0])));
486  os << (srFlag == -1 ? ' ' : srpFlagMarker[srFlag]);
487  }
488  os << "\n"; //one Y supercystal column per line
489  } //next supercrystal X-index
490 
491  //event trailer:
492  os << "\n";
493 }

References cms::cuda::assert(), edm::SortedCollection< T, SORT >::begin(), indexGen::date, edm::SortedCollection< T, SORT >::end(), RemoveAddSevLevel::flag, mps_fire::i, L1TowerCalibrationProducer_cfi::iEta, iEvent, nEndcaps, srpFlagMarker, submitPVValidationJobs::t, and protons_cff::time.

Referenced by produce().

◆ printTTFlags()

void EcalSelectiveReadoutProducer::printTTFlags ( const EcalTrigPrimDigiCollection tp,
std::ostream &  os 
) const
private

Definition at line 246 of file EcalSelectiveReadoutProducer.cc.

246  {
247  const char tccFlagMarker[] = {'x', '.', 'S', '?', 'C', 'E', 'E', 'E', 'E'};
250 
251  //static bool firstCall=true;
252  // if(firstCall){
253  // firstCall=false;
254  os << "# TCC flag map\n#\n"
255  "# +-->Phi "
256  << tccFlagMarker[0 + 1]
257  << ": 000 (low interest)\n"
258  "# | "
259  << tccFlagMarker[1 + 1]
260  << ": 001 (mid interest)\n"
261  "# | "
262  << tccFlagMarker[2 + 1]
263  << ": 010 (not valid)\n"
264  "# V Eta "
265  << tccFlagMarker[3 + 1]
266  << ": 011 (high interest)\n"
267  "# "
268  << tccFlagMarker[4 + 1]
269  << ": 1xx forced readout (Hw error)\n"
270  "#\n";
271  //}
272 
273  vector<vector<int> > ttf(nEta, vector<int>(nPhi, -1));
274  for (EcalTrigPrimDigiCollection::const_iterator it = tp.begin(); it != tp.end(); ++it) {
275  const EcalTriggerPrimitiveDigi& trigPrim = *it;
276  if (trigPrim.size() > 0) {
277  int iEta = trigPrim.id().ieta();
278  int iEta0 = iEta < 0 ? iEta + nEta / 2 : iEta + nEta / 2 - 1;
279  int iPhi0 = trigPrim.id().iphi() - 1;
280  ttf[iEta0][iPhi0] = trigPrim.ttFlag();
281  }
282  }
283  for (int iEta = 0; iEta < nEta; ++iEta) {
284  for (int iPhi = 0; iPhi < nPhi; ++iPhi) {
285  os << tccFlagMarker[ttf[iEta][iPhi] + 1];
286  }
287  os << "\n";
288  }
289 }

References EcalTriggerPrimitiveDigi::id(), EcalTrigTowerDetId::ieta(), L1TowerCalibrationProducer_cfi::iEta, EcalTrigTowerDetId::iphi(), HLT_FULL_cff::nEta, HLT_FULL_cff::nPhi, EcalSelectiveReadout::nTriggerTowersInEta, EcalSelectiveReadout::nTriggerTowersInPhi, EcalTriggerPrimitiveDigi::size(), tccFlagMarker, cmsswSequenceInfo::tp, and EcalTriggerPrimitiveDigi::ttFlag().

◆ produce()

void EcalSelectiveReadoutProducer::produce ( edm::Event event,
const edm::EventSetup eventSetup 
)
overridevirtual

Produces the EDM products

Parameters
CMSevent
eventSetupevent conditions

Implements edm::one::EDProducerBase.

Definition at line 89 of file EcalSelectiveReadoutProducer.cc.

89  {
90  if (useCondDb_) {
91  //getting selective readout configuration:
93 
94  settings_ = hSr.product();
95  }
96 
97  //gets the trigger primitives:
98  EcalTrigPrimDigiCollection emptyTPColl;
99  const EcalTrigPrimDigiCollection* trigPrims =
100  (trigPrimBypass_ && trigPrimBypassMode_ == 0) ? &emptyTPColl : getTrigPrims(event);
101 
102  //gets the digis from the events:
103  EBDigiCollection dummyEbDigiColl;
104  EEDigiCollection dummyEeDigiColl;
105 
106  const EBDigiCollection* ebDigis = produceDigis_ ? getEBDigis(event) : &dummyEbDigiColl;
107  const EEDigiCollection* eeDigis = produceDigis_ ? getEEDigis(event) : &dummyEeDigiColl;
108 
109  //runs the selective readout algorithm:
110  unique_ptr<EBDigiCollection> selectedEBDigis;
111  unique_ptr<EEDigiCollection> selectedEEDigis;
112  unique_ptr<EBSrFlagCollection> ebSrFlags;
113  unique_ptr<EESrFlagCollection> eeSrFlags;
114 
115  if (produceDigis_) {
116  selectedEBDigis = std::make_unique<EBDigiCollection>();
117  selectedEEDigis = std::make_unique<EEDigiCollection>();
118  }
119 
120  if (writeSrFlags_) {
121  ebSrFlags = std::make_unique<EBSrFlagCollection>();
122  eeSrFlags = std::make_unique<EESrFlagCollection>();
123  }
124 
125  if (suppressor_.get() == nullptr) {
126  //Check the validity of EcalSRSettings
128 
129  //instantiates the selective readout algorithm:
130  suppressor_ = std::make_unique<EcalSelectiveReadoutSuppressor>(params_, settings_);
131 
132  // check that everything is up-to-date
133  checkGeometry(eventSetup);
134  checkTriggerMap(eventSetup);
135  checkElecMap(eventSetup);
136  }
137 
138  suppressor_->run(eventSetup,
139  *trigPrims,
140  *ebDigis,
141  *eeDigis,
142  selectedEBDigis.get(),
143  selectedEEDigis.get(),
144  ebSrFlags.get(),
145  eeSrFlags.get());
146 
147  if (dumpFlags_ >= iEvent_) {
148  ofstream ttfFile("TTF.txt", (iEvent_ == 1 ? ios::trunc : ios::app));
149  suppressor_->printTTFlags(ttfFile, iEvent_, iEvent_ == 1 ? true : false);
150 
151  ofstream srfFile("SRF.txt", (iEvent_ == 1 ? ios::trunc : ios::app));
152  if (iEvent_ == 1) {
153  suppressor_->getEcalSelectiveReadout()->printHeader(srfFile);
154  }
155  srfFile << "# Event " << iEvent_ << "\n";
156  suppressor_->getEcalSelectiveReadout()->print(srfFile);
157  srfFile << "\n";
158 
159  ofstream afFile("AF.txt", (iEvent_ == 1 ? ios::trunc : ios::app));
160  printSrFlags(afFile, *ebSrFlags, *eeSrFlags, iEvent_, iEvent_ == 1 ? true : false);
161  }
162 
163  ++iEvent_; //event counter
164 
165  if (produceDigis_) {
166  //puts the selected digis into the event:
167  event.put(std::move(selectedEBDigis), ebSRPdigiCollection_);
168  event.put(std::move(selectedEEDigis), eeSRPdigiCollection_);
169  }
170 
171  //puts the SR flags into the event:
172  if (writeSrFlags_) {
173  event.put(std::move(ebSrFlags), ebSrFlagCollection_);
174  event.put(std::move(eeSrFlags), eeSrFlagCollection_);
175  }
176 }

References checkElecMap(), checkGeometry(), checkTriggerMap(), checkValidity(), dumpFlags_, ebSrFlagCollection_, ebSRPdigiCollection_, SimL1EmulatorDM_cff::eeDigis, eeSrFlagCollection_, eeSRPdigiCollection_, getEBDigis(), getEEDigis(), edm::EventSetup::getHandle(), getTrigPrims(), hSr_token_, iEvent_, eostools::move(), params_, printSrFlags(), produceDigis_, edm::ESHandle< T >::product(), settings_, suppressor_, trigPrimBypass_, trigPrimBypassMode_, pileupReCalc_HLTpaths::trunc, useCondDb_, and writeSrFlags_.

Member Data Documentation

◆ digiProducer_

std::string EcalSelectiveReadoutProducer::digiProducer_
private

Definition at line 89 of file EcalSelectiveReadoutProducer.h.

Referenced by EcalSelectiveReadoutProducer().

◆ dumpFlags_

int EcalSelectiveReadoutProducer::dumpFlags_
private

Number of event whose TT and SR flags must be dumped into a file.

Definition at line 111 of file EcalSelectiveReadoutProducer.h.

Referenced by EcalSelectiveReadoutProducer(), and produce().

◆ EB_token

edm::EDGetTokenT<EBDigiCollection> EcalSelectiveReadoutProducer::EB_token
private

Definition at line 149 of file EcalSelectiveReadoutProducer.h.

Referenced by EcalSelectiveReadoutProducer(), and getEBDigis().

◆ ebdigiCollection_

std::string EcalSelectiveReadoutProducer::ebdigiCollection_
private

Definition at line 90 of file EcalSelectiveReadoutProducer.h.

Referenced by EcalSelectiveReadoutProducer().

◆ ebSrFlagCollection_

std::string EcalSelectiveReadoutProducer::ebSrFlagCollection_
private

Definition at line 94 of file EcalSelectiveReadoutProducer.h.

Referenced by EcalSelectiveReadoutProducer(), and produce().

◆ ebSRPdigiCollection_

std::string EcalSelectiveReadoutProducer::ebSRPdigiCollection_
private

Definition at line 92 of file EcalSelectiveReadoutProducer.h.

Referenced by EcalSelectiveReadoutProducer(), and produce().

◆ EcTP_token

edm::EDGetTokenT<EcalTrigPrimDigiCollection> EcalSelectiveReadoutProducer::EcTP_token
private

Definition at line 151 of file EcalSelectiveReadoutProducer.h.

Referenced by EcalSelectiveReadoutProducer(), and getTrigPrims().

◆ EE_token

edm::EDGetTokenT<EEDigiCollection> EcalSelectiveReadoutProducer::EE_token
private

Definition at line 150 of file EcalSelectiveReadoutProducer.h.

Referenced by EcalSelectiveReadoutProducer(), and getEEDigis().

◆ eedigiCollection_

std::string EcalSelectiveReadoutProducer::eedigiCollection_
private

Definition at line 91 of file EcalSelectiveReadoutProducer.h.

Referenced by EcalSelectiveReadoutProducer().

◆ eElecmap_token_

edm::ESGetToken<EcalElectronicsMapping, EcalMappingRcd> EcalSelectiveReadoutProducer::eElecmap_token_
private

Definition at line 155 of file EcalSelectiveReadoutProducer.h.

Referenced by checkElecMap(), and EcalSelectiveReadoutProducer().

◆ eeSrFlagCollection_

std::string EcalSelectiveReadoutProducer::eeSrFlagCollection_
private

Definition at line 95 of file EcalSelectiveReadoutProducer.h.

Referenced by EcalSelectiveReadoutProducer(), and produce().

◆ eeSRPdigiCollection_

std::string EcalSelectiveReadoutProducer::eeSRPdigiCollection_
private

Definition at line 93 of file EcalSelectiveReadoutProducer.h.

Referenced by EcalSelectiveReadoutProducer(), and produce().

◆ eTTmap_token_

edm::ESGetToken<EcalTrigTowerConstituentsMap, IdealGeometryRecord> EcalSelectiveReadoutProducer::eTTmap_token_
private

◆ firstCallEB_

bool EcalSelectiveReadoutProducer::firstCallEB_
private

keys

Definition at line 138 of file EcalSelectiveReadoutProducer.h.

Referenced by getEBDigis().

◆ firstCallEE_

bool EcalSelectiveReadoutProducer::firstCallEE_
private

Definition at line 139 of file EcalSelectiveReadoutProducer.h.

Referenced by getEEDigis().

◆ geom_token_

edm::ESGetToken<CaloGeometry, CaloGeometryRecord> EcalSelectiveReadoutProducer::geom_token_
private

Definition at line 153 of file EcalSelectiveReadoutProducer.h.

Referenced by checkGeometry(), and EcalSelectiveReadoutProducer().

◆ hSr_token_

edm::ESGetToken<EcalSRSettings, EcalSRSettingsRcd> EcalSelectiveReadoutProducer::hSr_token_
private

Definition at line 152 of file EcalSelectiveReadoutProducer.h.

Referenced by EcalSelectiveReadoutProducer(), and produce().

◆ iEvent_

int EcalSelectiveReadoutProducer::iEvent_
private

Definition at line 140 of file EcalSelectiveReadoutProducer.h.

Referenced by produce().

◆ params_

edm::ParameterSet EcalSelectiveReadoutProducer::params_
private

Definition at line 103 of file EcalSelectiveReadoutProducer.h.

Referenced by produce().

◆ produceDigis_

bool EcalSelectiveReadoutProducer::produceDigis_
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 120 of file EcalSelectiveReadoutProducer.h.

Referenced by EcalSelectiveReadoutProducer(), and produce().

◆ settings_

const EcalSRSettings* EcalSelectiveReadoutProducer::settings_
private

SR settings

Definition at line 124 of file EcalSelectiveReadoutProducer.h.

Referenced by checkWeights(), EcalSelectiveReadoutProducer(), and produce().

◆ settingsFromFile_

std::unique_ptr<EcalSRSettings> EcalSelectiveReadoutProducer::settingsFromFile_
private

Used when settings_ is imported from configuration file. Just used for memory management. Used settings_ to access to the object

Definition at line 145 of file EcalSelectiveReadoutProducer.h.

Referenced by EcalSelectiveReadoutProducer().

◆ suppressor_

std::unique_ptr<EcalSelectiveReadoutSuppressor> EcalSelectiveReadoutProducer::suppressor_
private

◆ theElecMap

const EcalElectronicsMapping* EcalSelectiveReadoutProducer::theElecMap
private

Definition at line 102 of file EcalSelectiveReadoutProducer.h.

Referenced by checkElecMap(), and EcalSelectiveReadoutProducer().

◆ theGeometry

const CaloGeometry* EcalSelectiveReadoutProducer::theGeometry
private

Definition at line 100 of file EcalSelectiveReadoutProducer.h.

Referenced by checkGeometry(), and EcalSelectiveReadoutProducer().

◆ theTriggerTowerMap

const EcalTrigTowerConstituentsMap* EcalSelectiveReadoutProducer::theTriggerTowerMap
private

◆ trigPrimBypass_

bool EcalSelectiveReadoutProducer::trigPrimBypass_
private

Definition at line 105 of file EcalSelectiveReadoutProducer.h.

Referenced by EcalSelectiveReadoutProducer(), and produce().

◆ trigPrimBypassMode_

int EcalSelectiveReadoutProducer::trigPrimBypassMode_
private

Definition at line 107 of file EcalSelectiveReadoutProducer.h.

Referenced by EcalSelectiveReadoutProducer(), and produce().

◆ trigPrimCollection_

std::string EcalSelectiveReadoutProducer::trigPrimCollection_
private

Definition at line 97 of file EcalSelectiveReadoutProducer.h.

Referenced by EcalSelectiveReadoutProducer().

◆ trigPrimProducer_

std::string EcalSelectiveReadoutProducer::trigPrimProducer_
private

Definition at line 96 of file EcalSelectiveReadoutProducer.h.

Referenced by EcalSelectiveReadoutProducer().

◆ useCondDb_

bool EcalSelectiveReadoutProducer::useCondDb_
private

Switch for retrieving SR settings from condition database instead of CMSSW python configuration file.

Definition at line 129 of file EcalSelectiveReadoutProducer.h.

Referenced by EcalSelectiveReadoutProducer(), and produce().

◆ useFullReadout_

bool EcalSelectiveReadoutProducer::useFullReadout_
private

Special switch to turn off SR entirely using special DB entries

Definition at line 134 of file EcalSelectiveReadoutProducer.h.

Referenced by EcalSelectiveReadoutProducer().

◆ writeSrFlags_

bool EcalSelectiveReadoutProducer::writeSrFlags_
private

switch to write out the SrFlags collections in the event

Definition at line 115 of file EcalSelectiveReadoutProducer.h.

Referenced by EcalSelectiveReadoutProducer(), and produce().

edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
EcalElectronicsMapping
Definition: EcalElectronicsMapping.h:28
EcalSRCondTools::importParameterSet
static void importParameterSet(EcalSRSettings &sr, const edm::ParameterSet &ps)
Definition: EcalSRCondTools.cc:148
EcalSelectiveReadoutProducer::settingsFromFile_
std::unique_ptr< EcalSRSettings > settingsFromFile_
Definition: EcalSelectiveReadoutProducer.h:145
EcalTriggerPrimitiveDigi::size
int size() const
Definition: EcalTriggerPrimitiveDigi.h:30
EESrFlag
Definition: EESrFlag.h:13
EcalSelectiveReadoutSuppressor::getFIRTapCount
static int getFIRTapCount()
Definition: EcalSelectiveReadoutSuppressor.h:30
mps_fire.i
i
Definition: mps_fire.py:428
EcalTrigTowerDetId::iphi
int iphi() const
get the tower iphi
Definition: EcalTrigTowerDetId.h:52
edm::ESInputTag
Definition: ESInputTag.h:87
edm::SortedCollection::const_iterator
std::vector< T >::const_iterator const_iterator
Definition: SortedCollection.h:80
EcalSelectiveReadoutProducer::checkWeights
void checkWeights(const edm::Event &evt, const edm::ProductID &noZSDigiId) const
Definition: EcalSelectiveReadoutProducer.cc:291
edm::Handle::product
T const * product() const
Definition: Handle.h:70
HLT_FULL_cff.nEta
nEta
Definition: HLT_FULL_cff.py:6586
EcalSelectiveReadoutProducer::digiProducer_
std::string digiProducer_
Definition: EcalSelectiveReadoutProducer.h:89
CalibrationSummaryClient_cfi.params
params
Definition: CalibrationSummaryClient_cfi.py:14
EcalSelectiveReadoutProducer::EE_token
edm::EDGetTokenT< EEDigiCollection > EE_token
Definition: EcalSelectiveReadoutProducer.h:150
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
EcalSelectiveReadoutProducer::trigPrimCollection_
std::string trigPrimCollection_
Definition: EcalSelectiveReadoutProducer.h:97
cms::cuda::assert
assert(be >=bs)
protons_cff.time
time
Definition: protons_cff.py:39
edm::SortedCollection
Definition: SortedCollection.h:49
EcalSelectiveReadoutProducer::getBinOfMax
bool getBinOfMax(const edm::Event &evt, const edm::ProductID &noZsDigiId, int &binOfMax) const
Definition: EcalSelectiveReadoutProducer.cc:338
EcalSelectiveReadoutProducer::useFullReadout_
bool useFullReadout_
Definition: EcalSelectiveReadoutProducer.h:134
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
edm::Handle< EBDigiCollection >
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
EcalTriggerPrimitiveDigi::ttFlag
int ttFlag() const
get the Trigger tower Flag of interesting sample
Definition: EcalTriggerPrimitiveDigi.cc:36
EcalSelectiveReadoutProducer::printSrFlags
static void printSrFlags(std::ostream &os, const EBSrFlagCollection &ebSrFlags, const EESrFlagCollection &eeSrFlags, int iEvent=-1, bool withHeader=true)
Definition: EcalSelectiveReadoutProducer.cc:355
EcalSelectiveReadoutProducer::EcTP_token
edm::EDGetTokenT< EcalTrigPrimDigiCollection > EcTP_token
Definition: EcalSelectiveReadoutProducer.h:151
EcalSelectiveReadoutProducer::getTrigPrims
const EcalTrigPrimDigiCollection * getTrigPrims(edm::Event &event) const
Definition: EcalSelectiveReadoutProducer.cc:204
EcalSelectiveReadoutProducer::ebdigiCollection_
std::string ebdigiCollection_
Definition: EcalSelectiveReadoutProducer.h:90
edm::parameterSet
ParameterSet const & parameterSet(StableProvenance const &provenance, ProcessHistory const &history)
Definition: Provenance.cc:11
CaloGeometry
Definition: CaloGeometry.h:21
nEndcaps
const static int nEndcaps
Definition: GenABIO.cc:115
EcalSelectiveReadoutProducer::checkValidity
static void checkValidity(const EcalSRSettings &settings)
Definition: EcalSelectiveReadoutProducer.cc:495
edm::SortedCollection::begin
const_iterator begin() const
Definition: SortedCollection.h:262
srpFlagMarker
const char srpFlagMarker[]
Definition: GenABIO.cc:163
EcalSelectiveReadoutProducer::produceDigis_
bool produceDigis_
Definition: EcalSelectiveReadoutProducer.h:120
EcalSelectiveReadoutProducer::writeSrFlags_
bool writeSrFlags_
Definition: EcalSelectiveReadoutProducer.h:115
HLT_FULL_cff.weights
weights
Definition: HLT_FULL_cff.py:99166
EBSrFlag
Definition: EBSrFlag.h:13
edm::ESHandle< EcalElectronicsMapping >
EcalSelectiveReadoutProducer::ebSrFlagCollection_
std::string ebSrFlagCollection_
Definition: EcalSelectiveReadoutProducer.h:94
cmsswSequenceInfo.tp
tp
Definition: cmsswSequenceInfo.py:17
EcalSelectiveReadoutProducer::trigPrimProducer_
std::string trigPrimProducer_
Definition: EcalSelectiveReadoutProducer.h:96
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EcalTrigTowerConstituentsMap
Definition: EcalTrigTowerConstituentsMap.h:19
EcalSelectiveReadoutProducer::eeSRPdigiCollection_
std::string eeSRPdigiCollection_
Definition: EcalSelectiveReadoutProducer.h:93
edm::Event::processHistory
ProcessHistory const & processHistory() const override
Definition: Event.cc:250
edm::ParameterSet
Definition: ParameterSet.h:47
EcalSelectiveReadout::nTriggerTowersInEta
const static size_t nTriggerTowersInEta
Definition: EcalSelectiveReadout.h:140
EcalSelectiveReadoutProducer::getEBDigis
const EBDigiCollection * getEBDigis(edm::Event &event)
Definition: EcalSelectiveReadoutProducer.cc:178
edm::StableProvenance
Definition: StableProvenance.h:30
EcalSelectiveReadoutProducer::suppressor_
std::unique_ptr< EcalSelectiveReadoutSuppressor > suppressor_
Definition: EcalSelectiveReadoutProducer.h:88
EBDigiCollection
Definition: EcalDigiCollections.h:56
edm::SortedCollection::end
const_iterator end() const
Definition: SortedCollection.h:267
EcalSelectiveReadoutProducer::eeSrFlagCollection_
std::string eeSrFlagCollection_
Definition: EcalSelectiveReadoutProducer.h:95
EEDigiCollection
Definition: EcalDigiCollections.h:69
EcalSelectiveReadoutProducer::eedigiCollection_
std::string eedigiCollection_
Definition: EcalSelectiveReadoutProducer.h:91
EcalSelectiveReadoutProducer::dumpFlags_
int dumpFlags_
Definition: EcalSelectiveReadoutProducer.h:111
HLT_FULL_cff.nPhi
nPhi
Definition: HLT_FULL_cff.py:6587
iEvent
int iEvent
Definition: GenABIO.cc:224
EcalSelectiveReadoutProducer::hSr_token_
edm::ESGetToken< EcalSRSettings, EcalSRSettingsRcd > hSr_token_
Definition: EcalSelectiveReadoutProducer.h:152
EcalSelectiveReadoutProducer::ebSRPdigiCollection_
std::string ebSRPdigiCollection_
Definition: EcalSelectiveReadoutProducer.h:92
edm::EventSetup::getHandle
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:155
EcalSelectiveReadoutProducer::theGeometry
const CaloGeometry * theGeometry
Definition: EcalSelectiveReadoutProducer.h:100
EcalTrigTowerDetId::ieta
int ieta() const
get the tower ieta
Definition: EcalTrigTowerDetId.h:44
EcalSelectiveReadoutProducer::firstCallEB_
bool firstCallEB_
Definition: EcalSelectiveReadoutProducer.h:138
EcalSelectiveReadoutProducer::iEvent_
int iEvent_
Definition: EcalSelectiveReadoutProducer.h:140
EcalSelectiveReadoutProducer::EB_token
edm::EDGetTokenT< EBDigiCollection > EB_token
Definition: EcalSelectiveReadoutProducer.h:149
EcalSelectiveReadoutProducer::firstCallEE_
bool firstCallEE_
Definition: EcalSelectiveReadoutProducer.h:139
EcalSRSettings::dccNormalizedWeights_
std::vector< std::vector< float > > dccNormalizedWeights_
Definition: EcalSRSettings.h:99
eostools.move
def move(src, dest)
Definition: eostools.py:511
indexGen.date
date
Definition: indexGen.py:99
EcalSelectiveReadoutProducer::eTTmap_token_
edm::ESGetToken< EcalTrigTowerConstituentsMap, IdealGeometryRecord > eTTmap_token_
Definition: EcalSelectiveReadoutProducer.h:154
EcalTriggerPrimitiveDigi::id
const EcalTrigTowerDetId & id() const
Definition: EcalTriggerPrimitiveDigi.h:29
EcalSelectiveReadoutProducer::checkTriggerMap
void checkTriggerMap(const edm::EventSetup &eventSetup)
Definition: EcalSelectiveReadoutProducer.cc:222
tccFlagMarker
const char tccFlagMarker[]
Definition: GenABIO.cc:164
EcalSRSettings::ecalDccZs1stSample_
std::vector< int > ecalDccZs1stSample_
Definition: EcalSRSettings.h:80
EcalSelectiveReadoutProducer::trigPrimBypass_
bool trigPrimBypass_
Definition: EcalSelectiveReadoutProducer.h:105
EcalTriggerPrimitiveDigi
Definition: EcalTriggerPrimitiveDigi.h:16
EcalSelectiveReadoutProducer::checkGeometry
void checkGeometry(const edm::EventSetup &eventSetup)
Definition: EcalSelectiveReadoutProducer.cc:210
Exception
Definition: hltDiff.cc:245
EcalSelectiveReadoutProducer::checkElecMap
void checkElecMap(const edm::EventSetup &eventSetup)
Definition: EcalSelectiveReadoutProducer.cc:234
EcalSelectiveReadoutProducer::settings_
const EcalSRSettings * settings_
Definition: EcalSelectiveReadoutProducer.h:124
edm::Event::getStableProvenance
StableProvenance const & getStableProvenance(BranchID const &theID) const
Definition: Event.cc:124
EcalSelectiveReadoutProducer::eElecmap_token_
edm::ESGetToken< EcalElectronicsMapping, EcalMappingRcd > eElecmap_token_
Definition: EcalSelectiveReadoutProducer.h:155
EcalSelectiveReadoutProducer::getEEDigis
const EEDigiCollection * getEEDigis(edm::Event &event)
Definition: EcalSelectiveReadoutProducer.cc:191
EcalSelectiveReadoutProducer::trigPrimBypassMode_
int trigPrimBypassMode_
Definition: EcalSelectiveReadoutProducer.h:107
L1TowerCalibrationProducer_cfi.iEta
iEta
Definition: L1TowerCalibrationProducer_cfi.py:60
mps_fire.result
result
Definition: mps_fire.py:311
EcalSelectiveReadoutProducer::geom_token_
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > geom_token_
Definition: EcalSelectiveReadoutProducer.h:153
cms::Exception
Definition: Exception.h:70
EcalSelectiveReadoutProducer::theElecMap
const EcalElectronicsMapping * theElecMap
Definition: EcalSelectiveReadoutProducer.h:102
EcalSelectiveReadoutProducer::theTriggerTowerMap
const EcalTrigTowerConstituentsMap * theTriggerTowerMap
Definition: EcalSelectiveReadoutProducer.h:101
event
Definition: event.py:1
EcalSelectiveReadoutProducer::params_
edm::ParameterSet params_
Definition: EcalSelectiveReadoutProducer.h:103
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
pileupReCalc_HLTpaths.trunc
trunc
Definition: pileupReCalc_HLTpaths.py:144
edm::HandleBase::id
ProductID id() const
Definition: HandleBase.cc:29
SimL1EmulatorDM_cff.eeDigis
eeDigis
Definition: SimL1EmulatorDM_cff.py:18
EcalSelectiveReadout::nTriggerTowersInPhi
const static size_t nTriggerTowersInPhi
Definition: EcalSelectiveReadout.h:143
edm::InputTag
Definition: InputTag.h:15
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:116
EcalSelectiveReadoutProducer::useCondDb_
bool useCondDb_
Definition: EcalSelectiveReadoutProducer.h:129