#include <EcalSelectiveReadoutSuppressor.h>
Public Types | |
enum | { BARREL, ENDCAP } |
Public Member Functions | |
EcalSelectiveReadoutSuppressor (const edm::ParameterSet ¶ms, const EcalSRSettings *settings) | |
EcalSelectiveReadout * | getEcalSelectiveReadout () |
void | printTTFlags (std::ostream &os, int iEvent=-1, bool withHeader=true) const |
void | run (const edm::EventSetup &eventSetup, const EcalTrigPrimDigiCollection &trigPrims, const EBDigiCollection &barrelDigis, const EEDigiCollection &endcapDigis, EBDigiCollection *selectedBarrelDigis, EEDigiCollection *selectedEndcapDigis, EBSrFlagCollection *ebSrFlags, EESrFlagCollection *eeSrFlags) |
void | run (const edm::EventSetup &eventSetup, const EcalTrigPrimDigiCollection &trigPrims, EBDigiCollection &barrelDigis, EEDigiCollection &endcapDigis) |
void | setElecMap (const EcalElectronicsMapping *map) |
void | setGeometry (const CaloGeometry *caloGeometry) |
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 EcalTrigPrimDigiCollection &trigPrims) |
void | setTtFlags (const edm::EventSetup &eventSetup, const EBDigiCollection &ebDigis, const EEDigiCollection &eeDigis) |
Private Attributes | |
std::vector< int > | actions_ |
EcalSelectiveReadout::ttFlag_t | defaultTtf_ |
std::unique_ptr< EcalSelectiveReadout > | ecalSelectiveReadout |
int | firstFIRSample |
std::vector< int > | firWeights |
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 | |
const static size_t | nBarrelTriggerTowersInEta = 34 |
const static size_t | nEndcaps = 2 |
const static size_t | nEndcapTriggerTowersInEta = 11 |
static const int | nFIRTaps = 6 |
const static size_t | nTriggerTowersInEta = 2 * nEndcapTriggerTowersInEta + nBarrelTriggerTowersInEta |
const static size_t | nTriggerTowersInPhi = 72 |
Definition at line 17 of file EcalSelectiveReadoutSuppressor.h.
anonymous enum |
Enumerator | |
---|---|
BARREL | |
ENDCAP |
Definition at line 25 of file EcalSelectiveReadoutSuppressor.h.
EcalSelectiveReadoutSuppressor::EcalSelectiveReadoutSuppressor | ( | const edm::ParameterSet & | params, |
const EcalSRSettings * | settings | ||
) |
Construtor.
params | configuration from python file |
settings | configuration from condition DB |
Definition at line 30 of file EcalSelectiveReadoutSuppressor.cc.
References EcalSRSettings::actions_, actions_, BARREL, EcalSRSettings::dccNormalizedWeights_, defaultTtf_, EcalSRSettings::deltaEta_, EcalSRSettings::deltaPhi_, EcalSRSettings::ebDccAdcToGeV_, EcalSRSettings::ecalDccZs1stSample_, ecalSelectiveReadout, EcalSRSettings::eeDccAdcToGeV_, ENDCAP, Exception, firstFIRSample, mps_fire::i, initCellThresholds(), CalibrationSummaryClient_cfi::params, EcalSRSettings::srpHighInterestChannelZS_, EcalSRSettings::srpLowInterestChannelZS_, symetricZS, EcalSRSettings::symetricZS_, thrUnit, trigPrimBypass_, trigPrimBypassHTH_, trigPrimBypassLTH_, trigPrimBypassMode_, trigPrimBypassWithPeakFinder_, ttThresOnCompressedEt_, and weights.
|
private |
Returns true if a digi passes the zero suppression.
frame,data | frame (aka digi). |
thr | zero suppression threshold in thrUnit. |
Definition at line 208 of file EcalSelectiveReadoutSuppressor.cc.
References firstFIRSample, amptDefault_cfi::frame, getFIRWeigths(), nFIRTaps, mps_fire::result, simplePhotonAnalyzer_cfi::sample, symetricZS, and w.
Referenced by esMonitoring.FDJsonServer::handle_accept(), and run().
|
private |
Definition at line 534 of file EcalSelectiveReadoutSuppressor.cc.
References beam_dqm_sourceclient-live_cfg::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 83 of file EcalSelectiveReadoutSuppressor.h.
References ecalSelectiveReadout.
|
inlinestatic |
Gets number of weights supported by the zero suppression filter
Definition at line 30 of file EcalSelectiveReadoutSuppressor.h.
References nFIRTaps.
Referenced by EcalSelectiveReadoutProducer::checkWeights().
|
private |
Gets the integer weights used by the zero suppression FIR filter.
Weight definitions:
If a FIR weights exceeds the (2**12-1) absolute value limit, its absolute value is replaced by (2**12-1).
Definition at line 421 of file EcalSelectiveReadoutSuppressor.cc.
References funct::abs(), firWeights, mps_fire::i, 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 142 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 111 of file EcalSelectiveReadoutSuppressor.cc.
References actions_, BARREL, ENDCAP, EcalSelectiveReadout::FORCED_MASK, mps_fire::i, internalThreshold(), SiStripPI::max, min(), srFlags, and zsThreshold.
Referenced by EcalSelectiveReadoutSuppressor().
|
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 188 of file EcalSelectiveReadoutSuppressor.cc.
References SiStripPI::max, 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 149 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 156 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 163 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_2018_cff::nEta, HLT_2018_cff::nPhi, EcalSelectiveReadout::nTriggerTowersInEta, EcalSelectiveReadout::nTriggerTowersInPhi, tccFlagMarker, and ttFlags.
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 277 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::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 263 of file EcalSelectiveReadoutSuppressor.cc.
References mtdUncalibratedRecHits_cfi::barrelDigis, mtdUncalibratedRecHits_cfi::endcapDigis, and options_cfi::eventSetup.
void EcalSelectiveReadoutSuppressor::setElecMap | ( | const EcalElectronicsMapping * | map | ) |
Set the ECAL electronics mapping
map | the ECAL electronics map |
Definition at line 101 of file EcalSelectiveReadoutSuppressor.cc.
References ecalSelectiveReadout, and genParticles_cff::map.
void EcalSelectiveReadoutSuppressor::setGeometry | ( | const CaloGeometry * | caloGeometry | ) |
Sets the geometry of the calorimeters
Definition at line 105 of file EcalSelectiveReadoutSuppressor.cc.
References ecalSelectiveReadout.
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 96 of file EcalSelectiveReadoutSuppressor.cc.
References ecalSelectiveReadout, genParticles_cff::map, and theTriggerMap.
|
private |
Help function to set the srFlags field.
trigPrim | the trigger primitive digi collection |
Definition at line 388 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 |
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 435 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(), edm::EventSetup::get(), get, 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 |
SR flag (low interest/single/neighbor/center) to action flag (suppress, ZS1, ZS2, FRO) map.
Definition at line 269 of file EcalSelectiveReadoutSuppressor.h.
Referenced by EcalSelectiveReadoutSuppressor(), and initCellThresholds().
|
private |
Default TTF to substitute if absent from the trigger primitive collection
Definition at line 302 of file EcalSelectiveReadoutSuppressor.h.
Referenced by EcalSelectiveReadoutSuppressor(), and setTtFlags().
|
private |
Help class to comput selective readout flags.
Definition at line 211 of file EcalSelectiveReadoutSuppressor.h.
Referenced by EcalSelectiveReadoutSuppressor(), getEcalSelectiveReadout(), run(), setElecMap(), setGeometry(), and setTriggerMap().
|
private |
Time position of the first sample to use in zero suppession FIR filter. Numbering starts at 0.
Definition at line 222 of file EcalSelectiveReadoutSuppressor.h.
Referenced by accept(), and EcalSelectiveReadoutSuppressor().
|
private |
Weights of zero suppression FIR filter
Definition at line 226 of file EcalSelectiveReadoutSuppressor.h.
Referenced by getFIRWeigths().
|
private |
Number of produced events
Definition at line 306 of file EcalSelectiveReadoutSuppressor.h.
Referenced by run().
|
staticprivate |
Number of eta trigger tower divisions in the barrel.
Definition at line 199 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 |
/** Number of endcap, obviously two.
Definition at line 191 of file EcalSelectiveReadoutSuppressor.h.
|
staticprivate |
Number of eta trigger tower divisions in one endcap.
Definition at line 195 of file EcalSelectiveReadoutSuppressor.h.
|
staticprivate |
Depth of DCC zero suppression FIR filter (number of taps), in principal 6.
Definition at line 231 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 203 of file EcalSelectiveReadoutSuppressor.h.
Referenced by setTtFlags().
|
staticprivate |
Number of phi divisions in trigger towers.
Definition at line 207 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 298 of file EcalSelectiveReadoutSuppressor.h.
Referenced by initCellThresholds(), and run().
|
private |
Flag to use a symetric zero suppression (cut on absolute value)
Definition at line 239 of file EcalSelectiveReadoutSuppressor.h.
Referenced by accept(), and EcalSelectiveReadoutSuppressor().
|
private |
Definition at line 213 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 253 of file EcalSelectiveReadoutSuppressor.h.
Referenced by EcalSelectiveReadoutSuppressor(), and internalThreshold().
|
private |
Switch for trigger primitive simulation module bypass debug mode.
Definition at line 257 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 290 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 285 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 264 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 280 of file EcalSelectiveReadoutSuppressor.h.
Referenced by EcalSelectiveReadoutSuppressor(), and setTtFlags().
|
private |
Trigger tower flags: see setTtFlags()
Definition at line 217 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 275 of file EcalSelectiveReadoutSuppressor.h.
Referenced by EcalSelectiveReadoutSuppressor(), run(), and setTtFlags().
|
private |
DCC zero suppression FIR filter uncalibrated normalized weigths
Definition at line 235 of file EcalSelectiveReadoutSuppressor.h.
Referenced by EcalSelectiveReadoutSuppressor(), frame2Energy(), and getFIRWeigths().
|
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 247 of file EcalSelectiveReadoutSuppressor.h.
Referenced by initCellThresholds(), and run().