#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, 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 | 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::auto_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 | |
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 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, edm::hlt::Exception, firstFIRSample, edm::ParameterSet::getParameter(), i, initCellThresholds(), 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 215 of file EcalSelectiveReadoutSuppressor.cc.
References EcalMGPASample::adc(), firstFIRSample, EcalMGPASample::gainId(), getFIRWeigths(), nFIRTaps, query::result, compare_using_db::sample, edm::DataFrame::size(), symetricZS, and w().
Referenced by Vispa.Gui.BoxContentDialog.BoxContentDialog::apply(), Vispa.Plugins.ConfigEditor.ToolDialog.ToolDialog::apply(), and run().
|
private |
Definition at line 559 of file EcalSelectiveReadoutSuppressor.cc.
References dtNoiseDBValidation_cfg::cerr, i, n, evf::evtn::offset(), and weights.
Referenced by setTtFlags().
|
inline |
For debugging purposes.
Definition at line 84 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.
<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 437 of file EcalSelectiveReadoutSuppressor.cc.
References abs, firWeights, 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 145 of file EcalSelectiveReadoutSuppressor.h.
|
private |
helpers for constructors
Initializes ZS threshold and SR classificion to SR ("action") flags
Definition at line 121 of file EcalSelectiveReadoutSuppressor.cc.
References actions_, BARREL, ENDCAP, EcalSelectiveReadout::FORCED_MASK, i, internalThreshold(), 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 194 of file EcalSelectiveReadoutSuppressor.cc.
References 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 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 163 of file EcalSelectiveReadoutSuppressor.h.
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 172 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 599 of file EcalSelectiveReadoutSuppressor.cc.
References EcalSelectiveReadout::nTriggerTowersInEta, EcalSelectiveReadout::nTriggerTowersInPhi, tccFlagMarker, and ttFlags.
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 270 of file EcalSelectiveReadoutSuppressor.cc.
References EBDigiCollection::swap(), and EEDigiCollection::swap().
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 287 of file EcalSelectiveReadoutSuppressor.cc.
References accept(), BARREL, edm::DataFrameContainer::begin(), EcalBarrel, ecalSelectiveReadout, edm::DataFrameContainer::end(), ENDCAP, edm::hlt::Exception, ievt_, LogDebug, nBarrelTriggerTowersInEta, nTriggerTowersInPhi, edm::DataFrameContainer::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 108 of file EcalSelectiveReadoutSuppressor.cc.
References ecalSelectiveReadout.
void EcalSelectiveReadoutSuppressor::setGeometry | ( | const CaloGeometry * | caloGeometry | ) |
Sets the geometry of the calorimeters
Definition at line 113 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 103 of file EcalSelectiveReadoutSuppressor.cc.
References ecalSelectiveReadout, Association::map, and theTriggerMap.
|
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 452 of file EcalSelectiveReadoutSuppressor.cc.
References edm::DataFrameContainer::begin(), alignCSCRings::e, DetId::Ecal, EcalBarrel, EcalEndcap, edm::DataFrameContainer::end(), frame2Energy(), edm::EventSetup::get(), CaloSubdetectorGeometry::getGeometry(), EEDataFrame::id(), EBDataFrame::id(), EcalTrigTowerDetId::ieta(), EcalTrigTowerDetId::iphi(), 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 402 of file EcalSelectiveReadoutSuppressor.cc.
References edm::SortedCollection< T, SORT >::begin(), defaultTtf_, edm::SortedCollection< T, SORT >::end(), 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 285 of file EcalSelectiveReadoutSuppressor.h.
Referenced by EcalSelectiveReadoutSuppressor(), and initCellThresholds().
|
private |
Default TTF to substitute if absent from the trigger primitive collection
Definition at line 319 of file EcalSelectiveReadoutSuppressor.h.
Referenced by EcalSelectiveReadoutSuppressor(), and setTtFlags().
|
private |
Help class to comput selective readout flags.
Definition at line 227 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 238 of file EcalSelectiveReadoutSuppressor.h.
Referenced by accept(), and EcalSelectiveReadoutSuppressor().
|
private |
Weights of zero suppression FIR filter
Definition at line 242 of file EcalSelectiveReadoutSuppressor.h.
Referenced by getFIRWeigths().
|
private |
Number of produced events
Definition at line 323 of file EcalSelectiveReadoutSuppressor.h.
Referenced by run().
|
staticprivate |
Number of eta trigger tower divisions in the barrel.
Definition at line 213 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 205 of file EcalSelectiveReadoutSuppressor.h.
|
staticprivate |
Number of eta trigger tower divisions in one endcap.
Definition at line 209 of file EcalSelectiveReadoutSuppressor.h.
|
staticprivate |
Depth of DCC zero suppression FIR filter (number of taps), in principal 6.
Definition at line 247 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 218 of file EcalSelectiveReadoutSuppressor.h.
Referenced by setTtFlags().
|
staticprivate |
Number of phi divisions in trigger towers.
Definition at line 222 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 315 of file EcalSelectiveReadoutSuppressor.h.
Referenced by initCellThresholds(), and run().
|
private |
Flag to use a symetric zero suppression (cut on absolute value)
Definition at line 255 of file EcalSelectiveReadoutSuppressor.h.
Referenced by accept(), and EcalSelectiveReadoutSuppressor().
|
private |
Definition at line 229 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 269 of file EcalSelectiveReadoutSuppressor.h.
Referenced by EcalSelectiveReadoutSuppressor(), and internalThreshold().
|
private |
Switch for trigger primitive simulation module bypass debug mode.
Definition at line 273 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 306 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 301 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 280 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 296 of file EcalSelectiveReadoutSuppressor.h.
Referenced by EcalSelectiveReadoutSuppressor(), and setTtFlags().
|
private |
Trigger tower flags: see setTtFlags()
Definition at line 233 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 291 of file EcalSelectiveReadoutSuppressor.h.
Referenced by EcalSelectiveReadoutSuppressor(), run(), and setTtFlags().
|
private |
DCC zero suppression FIR filter uncalibrated normalized weigths
Definition at line 251 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 263 of file EcalSelectiveReadoutSuppressor.h.
Referenced by initCellThresholds(), and run().