CMS 3D CMS Logo

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

#include <HGCalConcentratorSelectionImpl.h>

Public Member Functions

uint32_t adcnBitsBH () const
 
double adcsaturationBH () const
 
void bestChoiceSelectImpl (const std::vector< l1t::HGCalTriggerCell > &trigCellVecInput, std::vector< l1t::HGCalTriggerCell > &trigCellVecOutput)
 
void eventSetup (const edm::EventSetup &es)
 
 HGCalConcentratorSelectionImpl (const edm::ParameterSet &conf)
 
double linLSB () const
 
size_t nCellsInModule () const
 
size_t nData () const
 
int TCThreshold_ADC () const
 
double TCThreshold_fC () const
 
int TCThresholdBH_ADC () const
 
double TCThresholdBH_MIP () const
 
void thresholdSelectImpl (const std::vector< l1t::HGCalTriggerCell > &trigCellVecInput, std::vector< l1t::HGCalTriggerCell > &trigCellVecOutput)
 

Private Attributes

double adcLSBBH_
 
uint32_t adcnBitsBH_
 
double adcsaturationBH_
 
double linLSB_
 
size_t nCellsInModule_
 
size_t nData_
 
int TCThreshold_ADC_
 
double TCThreshold_fC_
 
int TCThresholdBH_ADC_
 
double TCThresholdBH_MIP_
 
double triggercell_threshold_scintillator_
 
double triggercell_threshold_silicon_
 
HGCalTriggerTools triggerTools_
 

Detailed Description

Definition at line 15 of file HGCalConcentratorSelectionImpl.h.

Constructor & Destructor Documentation

HGCalConcentratorSelectionImpl::HGCalConcentratorSelectionImpl ( const edm::ParameterSet conf)

Definition at line 3 of file HGCalConcentratorSelectionImpl.cc.

References adcLSBBH_, adcnBitsBH_, adcsaturationBH_, createfilelist::int, linLSB_, nCellsInModule_, nData_, funct::pow(), TCThreshold_ADC_, TCThreshold_fC_, TCThresholdBH_ADC_, and TCThresholdBH_MIP_.

4  : nData_(conf.getParameter<uint32_t>("NData")),
5  nCellsInModule_(conf.getParameter<uint32_t>("MaxCellsInModule")),
6  linLSB_(conf.getParameter<double>("linLSB")),
7  adcsaturationBH_(conf.getParameter<double>("adcsaturationBH")),
8  adcnBitsBH_(conf.getParameter<uint32_t>("adcnBitsBH")),
9  TCThreshold_fC_(conf.getParameter<double>("TCThreshold_fC")),
10  TCThresholdBH_MIP_(conf.getParameter<double>("TCThresholdBH_MIP")),
11  triggercell_threshold_silicon_(conf.getParameter<double>("triggercell_threshold_silicon")),
12  triggercell_threshold_scintillator_(conf.getParameter<double>("triggercell_threshold_scintillator")) {
13  // Cannot have more selected cells than the max number of cells
14  if (nData_ > nCellsInModule_)
19 }
T getParameter(std::string const &) const
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40

Member Function Documentation

uint32_t HGCalConcentratorSelectionImpl::adcnBitsBH ( ) const
inline

Definition at line 29 of file HGCalConcentratorSelectionImpl.h.

References adcnBitsBH_.

double HGCalConcentratorSelectionImpl::adcsaturationBH ( ) const
inline
void HGCalConcentratorSelectionImpl::bestChoiceSelectImpl ( const std::vector< l1t::HGCalTriggerCell > &  trigCellVecInput,
std::vector< l1t::HGCalTriggerCell > &  trigCellVecOutput 
)

Definition at line 35 of file HGCalConcentratorSelectionImpl.cc.

References a, b, l1t::L1Candidate::hwPt(), nData_, and jetUpdater_cfi::sort.

36  {
37  trigCellVecOutput = trigCellVecInput;
38  // sort, reverse order
39  std::sort(trigCellVecOutput.begin(),
40  trigCellVecOutput.end(),
41  [](const l1t::HGCalTriggerCell& a, const l1t::HGCalTriggerCell& b) -> bool { return a.hwPt() > b.hwPt(); });
42 
43  // keep only the first trigger cells
44  if (trigCellVecOutput.size() > nData_)
45  trigCellVecOutput.resize(nData_);
46 }
int hwPt() const
Definition: L1Candidate.h:48
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
void HGCalConcentratorSelectionImpl::eventSetup ( const edm::EventSetup es)
inline

Definition at line 35 of file HGCalConcentratorSelectionImpl.h.

References HGCalTriggerTools::eventSetup(), and triggerTools_.

void eventSetup(const edm::EventSetup &)
double HGCalConcentratorSelectionImpl::linLSB ( ) const
inline

Definition at line 26 of file HGCalConcentratorSelectionImpl.h.

References linLSB_.

size_t HGCalConcentratorSelectionImpl::nCellsInModule ( ) const
inline
size_t HGCalConcentratorSelectionImpl::nData ( ) const
inline

Definition at line 27 of file HGCalConcentratorSelectionImpl.h.

References nData_.

int HGCalConcentratorSelectionImpl::TCThreshold_ADC ( ) const
inline
double HGCalConcentratorSelectionImpl::TCThreshold_fC ( ) const
inline
int HGCalConcentratorSelectionImpl::TCThresholdBH_ADC ( ) const
inline
double HGCalConcentratorSelectionImpl::TCThresholdBH_MIP ( ) const
inline
void HGCalConcentratorSelectionImpl::thresholdSelectImpl ( const std::vector< l1t::HGCalTriggerCell > &  trigCellVecInput,
std::vector< l1t::HGCalTriggerCell > &  trigCellVecOutput 
)

Definition at line 21 of file HGCalConcentratorSelectionImpl.cc.

References HGCalTriggerTools::isScintillator(), TCThreshold_ADC_, TCThresholdBH_ADC_, electronIdCutBased_cfi::threshold, triggercell_threshold_scintillator_, triggercell_threshold_silicon_, and triggerTools_.

22  {
23  for (const auto& trigCell : trigCellVecInput) {
24  bool isScintillator = triggerTools_.isScintillator(trigCell.detId());
25  int threshold = (isScintillator ? TCThresholdBH_ADC_ : TCThreshold_ADC_);
26  double triggercell_threshold =
28 
29  if ((trigCell.hwPt() >= threshold) && (trigCell.mipPt() >= triggercell_threshold)) {
30  trigCellVecOutput.push_back(trigCell);
31  }
32  }
33 }
bool isScintillator(const DetId &id) const

Member Data Documentation

double HGCalConcentratorSelectionImpl::adcLSBBH_
private

Definition at line 43 of file HGCalConcentratorSelectionImpl.h.

Referenced by HGCalConcentratorSelectionImpl().

uint32_t HGCalConcentratorSelectionImpl::adcnBitsBH_
private

Definition at line 42 of file HGCalConcentratorSelectionImpl.h.

Referenced by adcnBitsBH(), and HGCalConcentratorSelectionImpl().

double HGCalConcentratorSelectionImpl::adcsaturationBH_
private
double HGCalConcentratorSelectionImpl::linLSB_
private

Definition at line 40 of file HGCalConcentratorSelectionImpl.h.

Referenced by HGCalConcentratorSelectionImpl(), and linLSB().

size_t HGCalConcentratorSelectionImpl::nCellsInModule_
private
size_t HGCalConcentratorSelectionImpl::nData_
private
int HGCalConcentratorSelectionImpl::TCThreshold_ADC_
private
double HGCalConcentratorSelectionImpl::TCThreshold_fC_
private
int HGCalConcentratorSelectionImpl::TCThresholdBH_ADC_
private
double HGCalConcentratorSelectionImpl::TCThresholdBH_MIP_
private
double HGCalConcentratorSelectionImpl::triggercell_threshold_scintillator_
private

Definition at line 49 of file HGCalConcentratorSelectionImpl.h.

Referenced by thresholdSelectImpl().

double HGCalConcentratorSelectionImpl::triggercell_threshold_silicon_
private

Definition at line 48 of file HGCalConcentratorSelectionImpl.h.

Referenced by thresholdSelectImpl().

HGCalTriggerTools HGCalConcentratorSelectionImpl::triggerTools_
private

Definition at line 51 of file HGCalConcentratorSelectionImpl.h.

Referenced by eventSetup(), and thresholdSelectImpl().