#include <EcalSelectiveReadoutSuppressor.h>
Public Types | |
enum | { BARREL, ENDCAP } |
Public Member Functions | |
EcalSelectiveReadoutSuppressor (const edm::ParameterSet ¶ms, edm::ConsumesCollector iC) | |
EcalSelectiveReadout * | getEcalSelectiveReadout () |
void | printTTFlags (std::ostream &os, int iEvent=-1, bool withHeader=true) const |
void | run (const edm::EventSetup &eventSetup, const EcalTrigPrimDigiCollection &trigPrims, EBDigiCollection &barrelDigis, EEDigiCollection &endcapDigis) |
void | run (const edm::EventSetup &eventSetup, const EcalTrigPrimDigiCollection &trigPrims, const EBDigiCollection &barrelDigis, const EEDigiCollection &endcapDigis, EBDigiCollection *selectedBarrelDigis, EEDigiCollection *selectedEndcapDigis, EBSrFlagCollection *ebSrFlags, EESrFlagCollection *eeSrFlags) |
void | setElecMap (const EcalElectronicsMapping *map) |
void | setGeometry (const CaloGeometry *caloGeometry) |
void | setSettings (const EcalSRSettings *settings) |
void | setTriggerMap (const EcalTrigTowerConstituentsMap *map) |
Static Public Member Functions | |
static int | getFIRTapCount () |
Private Member Functions | |
bool | accept (const edm::DataFrame &frame, int thr) |
template<class T > | |
double | frame2Energy (const T &frame, int timeOffset=0) const |
std::vector< int > | getFIRWeigths () |
int | iEta2cIndex (int iEta) const |
void | initCellThresholds (double barrelLowInterest, double endcapLowInterest, double barrelHighInterest, double endcapHighInterest) |
helpers for constructors More... | |
int | internalThreshold (double thresholdInGeV, int iSubDet) const |
int | iPhi2cIndex (int iPhi) const |
int | iTTEta2cIndex (int iEta) const |
int | iTTPhi2cIndex (int iPhi) const |
void | setTtFlags (const edm::EventSetup &eventSetup, const EBDigiCollection &ebDigis, const EEDigiCollection &eeDigis) |
void | setTtFlags (const EcalTrigPrimDigiCollection &trigPrims) |
Private Attributes | |
std::vector< int > | actions_ |
EcalSelectiveReadout::ttFlag_t | defaultTtf_ |
std::unique_ptr< EcalSelectiveReadout > | ecalSelectiveReadout |
int | firstFIRSample |
std::vector< int > | firWeights |
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > | geoToken_ |
int | ievt_ |
int | srFlags [2][8] |
bool | symetricZS |
const EcalTrigTowerConstituentsMap * | theTriggerMap |
double | thrUnit [2] |
bool | trigPrimBypass_ |
double | trigPrimBypassHTH_ |
double | trigPrimBypassLTH_ |
int | trigPrimBypassMode_ |
bool | trigPrimBypassWithPeakFinder_ |
EcalSelectiveReadout::ttFlag_t | ttFlags [nTriggerTowersInEta][nTriggerTowersInPhi] |
bool | ttThresOnCompressedEt_ |
std::vector< float > | weights |
int | zsThreshold [2][8] |
Static Private Attributes | |
static const size_t | nBarrelTriggerTowersInEta = 34 |
static const size_t | nEndcaps = 2 |
static const size_t | nEndcapTriggerTowersInEta = 11 |
static const int | nFIRTaps = 6 |
static const size_t | nTriggerTowersInEta = 2 * nEndcapTriggerTowersInEta + nBarrelTriggerTowersInEta |
static const size_t | nTriggerTowersInPhi = 72 |
Definition at line 20 of file EcalSelectiveReadoutSuppressor.h.
anonymous enum |
Enumerator | |
---|---|
BARREL | |
ENDCAP |
Definition at line 30 of file EcalSelectiveReadoutSuppressor.h.
EcalSelectiveReadoutSuppressor::EcalSelectiveReadoutSuppressor | ( | const edm::ParameterSet & | params, |
edm::ConsumesCollector | iC | ||
) |
Construtor.
params | configuration from python file |
settings | configuration from condition DB |
Definition at line 29 of file EcalSelectiveReadoutSuppressor.cc.
References defaultTtf_, Exception, submitPVValidationJobs::params, trigPrimBypass_, trigPrimBypassHTH_, trigPrimBypassLTH_, trigPrimBypassMode_, trigPrimBypassWithPeakFinder_, and ttThresOnCompressedEt_.
|
private |
Returns true if a digi passes the zero suppression.
frame,data | frame (aka digi). |
thr | zero suppression threshold in thrUnit. |
Definition at line 209 of file EcalSelectiveReadoutSuppressor.cc.
References firstFIRSample, amptDefault_cfi::frame, getFIRWeigths(), nFIRTaps, mps_fire::result, ecalGpuTask_cfi::sample, symetricZS, and w().
Referenced by esMonitoring.FDJsonServer::handle_accept(), and run().
|
private |
Definition at line 534 of file EcalSelectiveReadoutSuppressor.cc.
References EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0::cerr, amptDefault_cfi::frame, mps_fire::i, dqmiodumpmetadata::n, hltrates_dqm_sourceclient-live_cfg::offset, and weights.
Referenced by setTtFlags().
|
inline |
For debugging purposes.
Definition at line 88 of file EcalSelectiveReadoutSuppressor.h.
References ecalSelectiveReadout.
Referenced by EcalSelectiveReadoutProducer::produce().
|
inlinestatic |
Gets number of weights supported by the zero suppression filter
Definition at line 35 of file EcalSelectiveReadoutSuppressor.h.
References nFIRTaps.
Referenced by EcalSelectiveReadoutProducer::checkWeights().
|
private |
Gets the integer weights used by the zero suppression FIR filter.
<U>Weight definitions:</U>
If a FIR weights exceeds the (2**12-1) absolute value limit, its absolute value is replaced by (2**12-1).
Definition at line 422 of file EcalSelectiveReadoutSuppressor.cc.
References funct::abs(), firWeights, mps_fire::i, SiStripPI::min, nFIRTaps, and weights.
Referenced by accept().
|
inlineprivate |
Transforms CMSSW eta ECAL crystal indices to indices starting at 0 to use for c-array or vector.
iEta | CMSSW eta index (numbering -85...-1,1...85) |
Definition at line 147 of file EcalSelectiveReadoutSuppressor.h.
References L1TowerCalibrationProducer_cfi::iEta.
|
private |
helpers for constructors
Initializes ZS threshold and SR classificion to SR ("action") flags
Definition at line 112 of file EcalSelectiveReadoutSuppressor.cc.
References actions_, BARREL, ENDCAP, EcalSelectiveReadout::FORCED_MASK, mps_fire::i, internalThreshold(), SiStripPI::max, SiStripPI::min, srFlags, and zsThreshold.
Referenced by setSettings().
|
private |
Converts threshold in GeV to threshold in internal unit used by the ZS FIR.
thresholdInGeV | the theshold in GeV |
iSubDet | 0 for barrel, 1 for endcap |
Definition at line 189 of file EcalSelectiveReadoutSuppressor.cc.
References SiStripPI::max, SiStripPI::min, and thrUnit.
Referenced by initCellThresholds().
|
inlineprivate |
Transforms CMSSW phi ECAL crystal indices to indices starting at 0 to use for c-array or vector.
iPhi | CMSSW phi index (numbering 1...360) |
Definition at line 154 of file EcalSelectiveReadoutSuppressor.h.
|
inlineprivate |
Transforms CMSSW eta ECAL TT indices to indices starting at 0 to use for c-array or vector.
iEta | CMSSW eta index (numbering -28...-1,28...56) |
Definition at line 161 of file EcalSelectiveReadoutSuppressor.h.
References L1TowerCalibrationProducer_cfi::iEta.
Referenced by setTtFlags().
|
inlineprivate |
Transforms CMSSW phi ECAL crystal indices to indices starting at 0 to use for c-array or vector.
iPhi | CMSSW phi index (numbering 1...72) |
Definition at line 168 of file EcalSelectiveReadoutSuppressor.h.
Referenced by setTtFlags().
void EcalSelectiveReadoutSuppressor::printTTFlags | ( | std::ostream & | os, |
int | iEvent = -1 , |
||
bool | withHeader = true |
||
) | const |
Writes out TT flags. On of the 'run' method must be called beforehand. Beware this method might be removed in future.
os | stream to write to |
iEvent | event index. Ignored if <0. |
withHeader. | If true writes out a header with the legend. |
Definition at line 570 of file EcalSelectiveReadoutSuppressor.cc.
References L1TowerCalibrationProducer_cfi::iEta, iEvent, HLT_2022v11_cff::nEta, HLT_2022v11_cff::nPhi, EcalSelectiveReadout::nTriggerTowersInEta, EcalSelectiveReadout::nTriggerTowersInPhi, tccFlagMarker, and ttFlags.
Referenced by EcalSelectiveReadoutProducer::produce().
void EcalSelectiveReadoutSuppressor::run | ( | const edm::EventSetup & | eventSetup, |
const EcalTrigPrimDigiCollection & | trigPrims, | ||
EBDigiCollection & | barrelDigis, | ||
EEDigiCollection & | endcapDigis | ||
) |
Runs the selective readout(SR) algorithm.
eventSetup | event conditions |
trigPrims | the ECAL trigger primitives used as input to the SR. |
barrelDigis | [in,out] the EB digi collection to filter |
endcapDigis | [in,out] the EE digi collection to filter |
Definition at line 264 of file EcalSelectiveReadoutSuppressor.cc.
References mtdUncalibratedRecHits_cfi::barrelDigis, mtdUncalibratedRecHits_cfi::endcapDigis, and options_cfi::eventSetup.
Referenced by EcalSelectiveReadoutProducer::produce().
void EcalSelectiveReadoutSuppressor::run | ( | const edm::EventSetup & | eventSetup, |
const EcalTrigPrimDigiCollection & | trigPrims, | ||
const EBDigiCollection & | barrelDigis, | ||
const EEDigiCollection & | endcapDigis, | ||
EBDigiCollection * | selectedBarrelDigis, | ||
EEDigiCollection * | selectedEndcapDigis, | ||
EBSrFlagCollection * | ebSrFlags, | ||
EESrFlagCollection * | eeSrFlags | ||
) |
Runs the selective readout (SR) algorithm.
eventSetup | event conditions |
trigPrims | the ECAL trigger primitives used as input to the SR. |
barrelDigis | the input EB digi collection |
endcapDigis | the input EE digi collection |
selectedBarrelDigis | [out] the EB digi passing the SR. Pointer to the collection to fill. If null, no collection is filled. |
selectedEndcapDigis | [out] the EE digi passing the SR. Pointer to the collection to fill. If null, no collection is filled. |
ebSrFlags | [out] the computed SR flags for EB. Pointer to the collection to fill. If null, no collection is filled. |
eeSrFlags | [out] the computed SR flags for EE. Pointer to the collection to fill. If null, no collection is filled. |
Definition at line 278 of file EcalSelectiveReadoutSuppressor.cc.
References accept(), BARREL, mtdUncalibratedRecHits_cfi::barrelDigis, CollectionTags_cfi::EBSrFlag, EcalBarrel, ecalSelectiveReadout, CollectionTags_cfi::EESrFlag, ENDCAP, mtdUncalibratedRecHits_cfi::endcapDigis, options_cfi::eventSetup, Exception, RemoveAddSevLevel::flag, triggerObjects_cff::id, L1TowerCalibrationProducer_cfi::iEta, ievt_, LogDebug, nBarrelTriggerTowersInEta, nTriggerTowersInPhi, EBDigiCollection::push_back(), EEDigiCollection::push_back(), edm::SortedCollection< T, SORT >::push_back(), edm::DataFrameContainer::reserve(), edm::SortedCollection< T, SORT >::reserve(), setTtFlags(), edm::DataFrameContainer::size(), srFlags, trigPrimBypass_, ttFlags, ttThresOnCompressedEt_, EcalScDetId::validDetId(), and zsThreshold.
void EcalSelectiveReadoutSuppressor::setElecMap | ( | const EcalElectronicsMapping * | map | ) |
Set the ECAL electronics mapping
map | the ECAL electronics map |
Definition at line 102 of file EcalSelectiveReadoutSuppressor.cc.
References ecalSelectiveReadout, and genParticles_cff::map.
Referenced by EcalSelectiveReadoutProducer::checkElecMap().
void EcalSelectiveReadoutSuppressor::setGeometry | ( | const CaloGeometry * | caloGeometry | ) |
Sets the geometry of the calorimeters
Definition at line 106 of file EcalSelectiveReadoutSuppressor.cc.
References ecalSelectiveReadout.
Referenced by EcalSelectiveReadoutProducer::checkGeometry().
void EcalSelectiveReadoutSuppressor::setSettings | ( | const EcalSRSettings * | settings | ) |
Definition at line 57 of file EcalSelectiveReadoutSuppressor.cc.
References EcalSRSettings::actions_, actions_, BARREL, EcalSRSettings::dccNormalizedWeights_, EcalSRSettings::deltaEta_, EcalSRSettings::deltaPhi_, EcalSRSettings::ebDccAdcToGeV_, EcalSRSettings::ecalDccZs1stSample_, ecalSelectiveReadout, EcalSRSettings::eeDccAdcToGeV_, ENDCAP, Exception, firstFIRSample, mps_fire::i, initCellThresholds(), EcalSRSettings::srpHighInterestChannelZS_, EcalSRSettings::srpLowInterestChannelZS_, symetricZS, EcalSRSettings::symetricZS_, thrUnit, and weights.
Referenced by EcalSelectiveReadoutProducer::produce().
void EcalSelectiveReadoutSuppressor::setTriggerMap | ( | const EcalTrigTowerConstituentsMap * | map | ) |
Set the mapping of which cell goes with which trigger tower
map | the trigger tower map |
Definition at line 97 of file EcalSelectiveReadoutSuppressor.cc.
References ecalSelectiveReadout, genParticles_cff::map, and theTriggerMap.
Referenced by EcalSelectiveReadoutProducer::checkTriggerMap().
|
private |
Help function to set the srFlags field. Used in TrigPrimByPass mode
eventSetup | the EDM event setup |
ebDigi | the ECAL barrel APD digis |
eeDigi | the ECAL endcap VPT digis |
Definition at line 436 of file EcalSelectiveReadoutSuppressor.cc.
References edm::DataFrameContainer::begin(), MillePedeFileConverter_cfg::e, DetId::Ecal, EcalBarrel, EcalEndcap, SimL1EmulatorDM_cff::eeDigis, edm::DataFrameContainer::end(), EgHLTOffHistBins_cfi::et, amptDefault_cfi::frame, frame2Energy(), geoToken_, edm::EventSetup::getData(), CaloSubdetectorGeometry::getGeometry(), iTTEta2cIndex(), iTTPhi2cIndex(), nTriggerTowersInEta, nTriggerTowersInPhi, funct::sin(), theta(), theTriggerMap, EcalTrigTowerConstituentsMap::towerOf(), trigPrimBypassHTH_, trigPrimBypassLTH_, trigPrimBypassWithPeakFinder_, EcalSelectiveReadout::TTF_HIGH_INTEREST, EcalSelectiveReadout::TTF_LOW_INTEREST, EcalSelectiveReadout::TTF_MID_INTEREST, ttFlags, and ecaldqm::ttId().
Referenced by run().
|
private |
Help function to set the srFlags field.
trigPrim | the trigger primitive digi collection |
Definition at line 389 of file EcalSelectiveReadoutSuppressor.cc.
References edm::SortedCollection< T, SORT >::begin(), defaultTtf_, edm::SortedCollection< T, SORT >::end(), L1TowerCalibrationProducer_cfi::iEta, nTriggerTowersInEta, nTriggerTowersInPhi, trigPrimBypassHTH_, trigPrimBypassLTH_, EcalSelectiveReadout::TTF_HIGH_INTEREST, EcalSelectiveReadout::TTF_LOW_INTEREST, EcalSelectiveReadout::TTF_MID_INTEREST, ttFlags, and ttThresOnCompressedEt_.
|
private |
SR flag (low interest/single/neighbor/center) to action flag (suppress, ZS1, ZS2, FRO) map.
Definition at line 274 of file EcalSelectiveReadoutSuppressor.h.
Referenced by initCellThresholds(), and setSettings().
|
private |
Default TTF to substitute if absent from the trigger primitive collection
Definition at line 307 of file EcalSelectiveReadoutSuppressor.h.
Referenced by EcalSelectiveReadoutSuppressor(), and setTtFlags().
|
private |
Help class to comput selective readout flags.
Definition at line 216 of file EcalSelectiveReadoutSuppressor.h.
Referenced by getEcalSelectiveReadout(), run(), setElecMap(), setGeometry(), setSettings(), and setTriggerMap().
|
private |
Time position of the first sample to use in zero suppession FIR filter. Numbering starts at 0.
Definition at line 227 of file EcalSelectiveReadoutSuppressor.h.
Referenced by accept(), and setSettings().
|
private |
Weights of zero suppression FIR filter
Definition at line 231 of file EcalSelectiveReadoutSuppressor.h.
Referenced by getFIRWeigths().
|
private |
Definition at line 313 of file EcalSelectiveReadoutSuppressor.h.
Referenced by setTtFlags().
|
private |
Number of produced events
Definition at line 311 of file EcalSelectiveReadoutSuppressor.h.
Referenced by run().
|
staticprivate |
Number of eta trigger tower divisions in the barrel.
Definition at line 204 of file EcalSelectiveReadoutSuppressor.h.
Referenced by run().
|
staticprivate |
Help function to get SR flag from ZS threshold using min/max convention for SUPPRESS and FULL_READOUT: see zsThreshold.
thr | ZS threshold in thrUnit |
flag | for Zero suppression: EcalSrFlag::SRF_ZS1 or EcalSrFlag::SRF_ZS2 |
Definition at line 196 of file EcalSelectiveReadoutSuppressor.h.
|
staticprivate |
Number of eta trigger tower divisions in one endcap.
Definition at line 200 of file EcalSelectiveReadoutSuppressor.h.
|
staticprivate |
Depth of DCC zero suppression FIR filter (number of taps), in principal 6.
Definition at line 236 of file EcalSelectiveReadoutSuppressor.h.
Referenced by accept(), getFIRTapCount(), and getFIRWeigths().
|
staticprivate |
Number of eta divisions in trigger towers for the whole ECAL
Definition at line 208 of file EcalSelectiveReadoutSuppressor.h.
Referenced by setTtFlags().
|
staticprivate |
Number of phi divisions in trigger towers.
Definition at line 212 of file EcalSelectiveReadoutSuppressor.h.
Referenced by run(), and setTtFlags().
|
private |
Maps RU interest flag (low interest, single neighbour, center) to Selective readout action flag (type of readout). 1st index: 0 for barrel, 1 for endcap 2nd index: RU interest (low, single, neighbour, center, forced low, forced single...)
Definition at line 303 of file EcalSelectiveReadoutSuppressor.h.
Referenced by initCellThresholds(), and run().
|
private |
Flag to use a symetric zero suppression (cut on absolute value)
Definition at line 244 of file EcalSelectiveReadoutSuppressor.h.
Referenced by accept(), and setSettings().
|
private |
Definition at line 218 of file EcalSelectiveReadoutSuppressor.h.
Referenced by setTriggerMap(), and setTtFlags().
|
private |
Internal unit for Zero Suppression threshold (1/4th ADC count) used by the FIR. Index: 0 for barrel, 1 for endcap
Definition at line 258 of file EcalSelectiveReadoutSuppressor.h.
Referenced by internalThreshold(), and setSettings().
|
private |
Switch for trigger primitive simulation module bypass debug mode.
Definition at line 262 of file EcalSelectiveReadoutSuppressor.h.
Referenced by EcalSelectiveReadoutSuppressor(), and run().
|
private |
Low TT Et threshold for trigger primitive simulation module bypass debug mode.
Definition at line 295 of file EcalSelectiveReadoutSuppressor.h.
Referenced by EcalSelectiveReadoutSuppressor(), and setTtFlags().
|
private |
Low TT Et threshold for trigger primitive simulation module bypass debug mode.
Definition at line 290 of file EcalSelectiveReadoutSuppressor.h.
Referenced by EcalSelectiveReadoutSuppressor(), and setTtFlags().
|
private |
Mode selection for "Trig bypass" mode 0: TT thresholds applied on sum of crystal Et's 1: TT thresholds applies on compressed Et from Trigger primitive
Definition at line 269 of file EcalSelectiveReadoutSuppressor.h.
Referenced by EcalSelectiveReadoutSuppressor().
|
private |
When in trigger primitive simulation module bypass debug mode, switch to enable Peak finder effect simulation
Definition at line 285 of file EcalSelectiveReadoutSuppressor.h.
Referenced by EcalSelectiveReadoutSuppressor(), and setTtFlags().
|
private |
Trigger tower flags: see setTtFlags()
Definition at line 222 of file EcalSelectiveReadoutSuppressor.h.
Referenced by printTTFlags(), run(), and setTtFlags().
|
private |
Switch to applies trigPrimBypassLTH_ and trigPrimBypassHTH_ thresholds on TPG compressed ET instead of using flags from TPG: trig prim bypass mode 1.
Definition at line 280 of file EcalSelectiveReadoutSuppressor.h.
Referenced by EcalSelectiveReadoutSuppressor(), run(), and setTtFlags().
|
private |
DCC zero suppression FIR filter uncalibrated normalized weigths
Definition at line 240 of file EcalSelectiveReadoutSuppressor.h.
Referenced by frame2Energy(), getFIRWeigths(), and setSettings().
|
private |
Zero suppresion threshold for the ECAL expressed in ebThrUnit and eeThrUnit. Set to numeric_limits<int>::min() for FULL READOUT and to numeric_limits<int>::max() for SUPPRESS. First index: 0 for barrel, 1 for endcap 2nd index: channel interest (see EcalSelectiveReadout::towerInterest_t
Definition at line 252 of file EcalSelectiveReadoutSuppressor.h.
Referenced by initCellThresholds(), and run().