CMS 3D CMS Logo

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

#include <HGCalVFESummationImpl.h>

Public Member Functions

void eventSetup (const edm::EventSetup &es)
 
 HGCalVFESummationImpl (const edm::ParameterSet &conf)
 
void triggerCellSums (const std::vector< std::pair< DetId, uint32_t > > &, std::unordered_map< uint32_t, uint32_t > &)
 

Private Attributes

double lsb_scintillator_MIP_
 
double lsb_silicon_fC_
 
double threshold_scintillator_
 
std::vector< double > thresholds_silicon_
 
HGCalTriggerTools triggerTools_
 

Detailed Description

Definition at line 12 of file HGCalVFESummationImpl.h.

Constructor & Destructor Documentation

◆ HGCalVFESummationImpl()

HGCalVFESummationImpl::HGCalVFESummationImpl ( const edm::ParameterSet conf)

Definition at line 3 of file HGCalVFESummationImpl.cc.

4  : lsb_silicon_fC_(conf.getParameter<double>("siliconCellLSB_fC")),
5  lsb_scintillator_MIP_(conf.getParameter<double>("scintillatorCellLSB_MIP")) {
6  constexpr unsigned nThickness = 3;
8  conf.getParameter<edm::ParameterSet>("noiseSilicon").getParameter<std::vector<double>>("values");
9  if (thresholds_silicon_.size() != nThickness) {
10  throw cms::Exception("Configuration") << thresholds_silicon_.size() << " silicon thresholds are given instead of "
11  << nThickness << " (the number of sensor thicknesses)";
12  }
13  threshold_scintillator_ = conf.getParameter<edm::ParameterSet>("noiseScintillator").getParameter<double>("noise_MIP");
14  const auto threshold = conf.getParameter<double>("noiseThreshold");
17  return noise * threshold;
18  });
20 }

References Exception, edm::ParameterSet::getParameter(), hgcalDigitizer_cfi::noise, remoteMonitoring_LED_IterMethod_cfg::threshold, threshold_scintillator_, thresholds_silicon_, and HcalDetIdTransform::transform().

Member Function Documentation

◆ eventSetup()

void HGCalVFESummationImpl::eventSetup ( const edm::EventSetup es)
inline

Definition at line 16 of file HGCalVFESummationImpl.h.

References HGCalTriggerTools::eventSetup(), and triggerTools_.

◆ triggerCellSums()

void HGCalVFESummationImpl::triggerCellSums ( const std::vector< std::pair< DetId, uint32_t > > &  ,
std::unordered_map< uint32_t, uint32_t > &   
)

Definition at line 22 of file HGCalVFESummationImpl.cc.

23  {
24  if (input_dataframes.empty())
25  return;
26  // sum energies in trigger cells
27  for (const auto& [cellid, value] : input_dataframes) {
28  // Apply noise threshold before summing into trigger cells
29  uint32_t value_zero_suppressed = value;
30  if (triggerTools_.isSilicon(cellid)) {
33  value_zero_suppressed = (value * lsb_silicon_fC_ > threshold ? value : 0);
34  } else if (triggerTools_.isScintillator(cellid)) {
35  value_zero_suppressed = (value * lsb_scintillator_MIP_ > threshold_scintillator_ ? value : 0);
36  }
37  if (value_zero_suppressed == 0)
38  continue;
39 
40  // find trigger cell associated to cell
41  uint32_t tcid = triggerTools_.getTriggerGeometry()->getTriggerCellFromCell(cellid);
42  triggercells.emplace(tcid, 0); // do nothing if key exists already
43 
44  // sums energy for the same trigger cell id
45  triggercells[tcid] += value_zero_suppressed; // 32 bits integer should be largely enough
46  }
47 }

References HGCalTriggerGeometryBase::getTriggerCellFromCell(), HGCalTriggerTools::getTriggerGeometry(), HGCalTriggerTools::isScintillator(), HGCalTriggerTools::isSilicon(), lsb_scintillator_MIP_, lsb_silicon_fC_, Calorimetry_cff::thickness, HGCalTriggerTools::thicknessIndex(), remoteMonitoring_LED_IterMethod_cfg::threshold, threshold_scintillator_, thresholds_silicon_, triggerTools_, and relativeConstraints::value.

Member Data Documentation

◆ lsb_scintillator_MIP_

double HGCalVFESummationImpl::lsb_scintillator_MIP_
private

Definition at line 21 of file HGCalVFESummationImpl.h.

Referenced by triggerCellSums().

◆ lsb_silicon_fC_

double HGCalVFESummationImpl::lsb_silicon_fC_
private

Definition at line 20 of file HGCalVFESummationImpl.h.

Referenced by triggerCellSums().

◆ threshold_scintillator_

double HGCalVFESummationImpl::threshold_scintillator_
private

Definition at line 23 of file HGCalVFESummationImpl.h.

Referenced by HGCalVFESummationImpl(), and triggerCellSums().

◆ thresholds_silicon_

std::vector<double> HGCalVFESummationImpl::thresholds_silicon_
private

Definition at line 22 of file HGCalVFESummationImpl.h.

Referenced by HGCalVFESummationImpl(), and triggerCellSums().

◆ triggerTools_

HGCalTriggerTools HGCalVFESummationImpl::triggerTools_
private

Definition at line 25 of file HGCalVFESummationImpl.h.

Referenced by eventSetup(), and triggerCellSums().

HGCalTriggerTools::eventSetup
void eventSetup(const edm::EventSetup &)
Definition: HGCalTriggerTools.cc:35
HGCalVFESummationImpl::lsb_silicon_fC_
double lsb_silicon_fC_
Definition: HGCalVFESummationImpl.h:20
HGCalVFESummationImpl::thresholds_silicon_
std::vector< double > thresholds_silicon_
Definition: HGCalVFESummationImpl.h:22
HGCalTriggerTools::thicknessIndex
int thicknessIndex(const DetId &, bool tc=false) const
Definition: HGCalTriggerTools.cc:233
HGCalTriggerTools::isScintillator
bool isScintillator(const DetId &id) const
Definition: HGCalTriggerTools.h:46
HGCalTriggerTools::isSilicon
bool isSilicon(const DetId &) const
Definition: HGCalTriggerTools.cc:181
HGCalTriggerTools::getTriggerGeometry
const HGCalTriggerGeometryBase * getTriggerGeometry() const
Definition: HGCalTriggerTools.h:69
HGCalVFESummationImpl::lsb_scintillator_MIP_
double lsb_scintillator_MIP_
Definition: HGCalVFESummationImpl.h:21
Calorimetry_cff.thickness
thickness
Definition: Calorimetry_cff.py:114
HcalDetIdTransform::transform
unsigned transform(const HcalDetId &id, unsigned transformCode)
Definition: HcalDetIdTransform.cc:7
HGCalTriggerGeometryBase::getTriggerCellFromCell
virtual unsigned getTriggerCellFromCell(const unsigned cell_det_id) const =0
edm::ParameterSet
Definition: ParameterSet.h:47
hgcalDigitizer_cfi.noise
noise
Definition: hgcalDigitizer_cfi.py:155
value
Definition: value.py:1
relativeConstraints.value
value
Definition: relativeConstraints.py:53
Exception
Definition: hltDiff.cc:246
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
HGCalVFESummationImpl::triggerTools_
HGCalTriggerTools triggerTools_
Definition: HGCalVFESummationImpl.h:25
HGCalVFESummationImpl::threshold_scintillator_
double threshold_scintillator_
Definition: HGCalVFESummationImpl.h:23
remoteMonitoring_LED_IterMethod_cfg.threshold
threshold
Definition: remoteMonitoring_LED_IterMethod_cfg.py:426