#include <EcalSelectiveReadout.h>
Public Types | |
enum | towerInterest_t { UNKNOWN = -1 & ~FORCED_MASK, LOWINTEREST = 0x0, SINGLE = 0x1, NEIGHBOUR = 0x2, CENTER = 0x3, FORCED_LOWINTEREST = 0x4, FORCED_SINGLE = 0x5, FORCED_NEIGHBOUR = 0x6, FORCED_CENTER = 0x7 } |
enum | ttFlag_t { TTF_UNKNOWN = -1, TTF_LOW_INTEREST = 0x0, TTF_MID_INTEREST = 0x1, TTF_HIGH_INTEREST = 0X3, TTF_FORCED_LOW_INTEREST = 0x4, TTF_FORCED_MID_INTEREST = 0x5, TTF_FORCED_HIGH_INTEREST = 0x7 } |
Public Member Functions | |
EcalSelectiveReadout (int dEta=1, int dPhi=1) | |
towerInterest_t | getCrystalInterest (const EBDetId &ebDetId) const |
towerInterest_t | getCrystalInterest (const EEDetId &eeDetId) const |
towerInterest_t | getSuperCrystalInterest (const EcalScDetId &scDetId) const |
towerInterest_t | getTowerInterest (const EcalTrigTowerDetId &towerId) const |
void | print (std::ostream &os) const |
print out the map More... | |
void | printBarrel (std::ostream &os) const |
void | printEndcap (int endcap, std::ostream &s) const |
void | printHeader (std::ostream &os) const |
print out header for the map: see print(std::ostream&) More... | |
void | runSelectiveReadout0 (const ttFlag_t towerFlags[nTriggerTowersInEta][nTriggerTowersInPhi]) |
void | setElecMap (const EcalElectronicsMapping *map) |
void | setTriggerMap (const EcalTrigTowerConstituentsMap *map) |
the mapping of which cell goes with which trigger tower More... | |
Static Public Attributes | |
static const int | FORCED_MASK = 0x4 |
const static int | maxDccChs = 68 |
const static size_t | nBarrelEtaBins = 170 |
const static size_t | nBarrelPhiBins = 360 |
const static size_t | nBarrelTowerEtaBins = nBarrelEtaBins / 5 |
const static size_t | nBarrelTowerPhiBins = nBarrelPhiBins / 5 |
const static size_t | nBarrelTriggerTowersInEta = 34 |
const static int | nDccPerEe = 9 |
const static size_t | nEndcaps = 2 |
const static size_t | nEndcapTriggerTowersInEta = 11 |
const static size_t | nEndcapXBins = 100 |
const static size_t | nEndcapYBins = 100 |
const static size_t | nSupercrystalXBins = nEndcapXBins / supercrystalEdge |
const static size_t | nSupercrystalYBins = nEndcapYBins / supercrystalEdge |
const static size_t | nTriggerTowersInEta = 2 * nEndcapTriggerTowersInEta + nBarrelTriggerTowersInEta |
const static size_t | nTriggerTowersInPhi = 72 |
const static size_t | supercrystalEdge = 5 |
static const int | TTF_FORCED_RO_MASK = FORCED_MASK |
Private Member Functions | |
void | classifyTriggerTowers (const ttFlag_t ttFlags[nTriggerTowersInEta][nTriggerTowersInPhi]) |
template<class T > | |
void | combineFlags (T &var, T val) const |
towerInterest_t & | eeRuInterest (const EcalScDetId &id) |
towerInterest_t & | eeRuInterest (const EEDetId &id) |
void | resetEeRuInterest () |
template<class T > | |
void | setHigher (T &var, T val) const |
void | setLower (int &var, int val) const |
This class is used to run the selective readout processing on the electromagnetic calorimeter. Normal user do not need to access directly this class: the selective readout is made at digitization by the CaloDataFrameFormatter class which uses the EcalSelectiveReadout class for this purpose: see CaloDataFrameFormatter class documentation. The ECAL event size must be reduced by a factor ~1/20th online at the LV1 rate. This reduction is achieved by suppressing channels whose energy, evaluated on line by a FIR, is below a threshold ("zero suppression"). This threshold is dynamic and determined for the channel of each readout unit. A readout unit is a group of 5x5 crystals: a trigger tower for the barrel and a supercrystal for the endcap) basis. The selective readout classifies the readout units in three classes:
. Single, neighbour and center classes consitute the "high interest" readout units and their channels the "high interest" channels. Two zero suppresion thresholds, eventually -/+ infinity, are defined: one for the "Low interest" channels and one for the "high interest" channels. The low interest threshold must be higher than the high interest one.
The trigger tower flag (TTF) issued by the TCC and indicating the level of transverse deposited energy (classified is three levels called low interest, mid interest, high interest), the selective readout flags (SRF) are made of 2 bits. An additionnal bit, called force bit, is used to indicate if some information was missing to compute the flag and if therefore some default value was used. TCC can substitute a default value to a TTF. In such case the forced bit is set. Similarly SRP can substitute a default value to a SRF and set the forced bit accordingly. If the TTF forced bit of a trigger tower is set the SRP propagates it to the SRF by setting the forced bit of every readout unit overlapping with the trigger tower. Note that for the barrel readout units match with trigger towers.
Definition at line 62 of file EcalSelectiveReadout.h.
trigger tower classification ("SRP flags")
Enumerator | |
---|---|
UNKNOWN | |
LOWINTEREST | |
SINGLE | |
NEIGHBOUR | |
CENTER | |
FORCED_LOWINTEREST | |
FORCED_SINGLE | |
FORCED_NEIGHBOUR | |
FORCED_CENTER |
Definition at line 69 of file EcalSelectiveReadout.h.
Enumerator | |
---|---|
TTF_UNKNOWN | |
TTF_LOW_INTEREST | |
TTF_MID_INTEREST | |
TTF_HIGH_INTEREST | |
TTF_FORCED_LOW_INTEREST | |
TTF_FORCED_MID_INTEREST | |
TTF_FORCED_HIGH_INTEREST |
Definition at line 81 of file EcalSelectiveReadout.h.
EcalSelectiveReadout::EcalSelectiveReadout | ( | int | dEta = 1 , |
int | dPhi = 1 |
||
) |
Constructs a ecalselectivereadout. Neighbours are taken in a trigger tower matrix of size 2(dEta+1))x2(dPhi+1) around a 'center' tower.
dEta | neighborhood extend in number of trigger towers along eta |
dPhi | neighborgooh extend in number if trigger towers along phi in 'low interest', 'single' or 'center. First element is the lower threshold, second element is the higher one. |
Definition at line 20 of file EcalSelectiveReadout.cc.
|
private |
Classifies trigger tower in three classes:
Definition at line 187 of file EcalSelectiveReadout.cc.
References CENTER, combineFlags(), HLT_FULL_cff::dEta, HLT_FULL_cff::dPhi, FORCED_MASK, mps_fire::i, L1TowerCalibrationProducer_cfi::iEta, createfilelist::int, LOWINTEREST, SiStripPI::max, NEIGHBOUR, nTriggerTowersInEta, nTriggerTowersInPhi, SINGLE, TTF_HIGH_INTEREST, and TTF_MID_INTEREST.
Referenced by runSelectiveReadout0().
Combine two flags. Forced bit and actual flag fields are treated separately. For both fields, the highst value is selected.
var | [in,out] flag to change in place |
val | flag to combine with the first. |
T | towerInterest_t or |
Definition at line 299 of file EcalSelectiveReadout.h.
References gather_cfg::cout, SiStripPI::max, TTF_FORCED_RO_MASK, heppy_batch::val, and trigObjTnPSource_cfi::var.
Referenced by classifyTriggerTowers(), and runSelectiveReadout0().
|
private |
Get access to eeRuInterest element corresponding to an SC det Id
id | the SC det id |
Definition at line 163 of file EcalSelectiveReadout.cc.
References cms::cuda::assert(), maxDccChs, nDccPerEe, and EcalScDetId::zside().
|
private |
Get access to eeRuInterest element corresponding to an EE det Id
id | the EE det id |
Definition at line 148 of file EcalSelectiveReadout.cc.
References cms::cuda::assert(), maxDccChs, nDccPerEe, UNKNOWN, and EcalElectronicsId::zside().
Referenced by runSelectiveReadout0().
EcalSelectiveReadout::towerInterest_t EcalSelectiveReadout::getCrystalInterest | ( | const EBDetId & | ebDetId | ) | const |
Gets the SR interest classification of an EB channel
ebDetId | id of the crystal |
interest |
Definition at line 131 of file EcalSelectiveReadout.cc.
References getTowerInterest().
EcalSelectiveReadout::towerInterest_t EcalSelectiveReadout::getCrystalInterest | ( | const EEDetId & | eeDetId | ) | const |
Gets the SR interest classification of an EE channel
eeDetId | id of the crystal |
Definition at line 136 of file EcalSelectiveReadout.cc.
EcalSelectiveReadout::towerInterest_t EcalSelectiveReadout::getSuperCrystalInterest | ( | const EcalScDetId & | scDetId | ) | const |
Gets the SR interest classification of an EE supercrystal
scDetId | id of the crystal |
Definition at line 144 of file EcalSelectiveReadout.cc.
Referenced by printEndcap().
EcalSelectiveReadout::towerInterest_t EcalSelectiveReadout::getTowerInterest | ( | const EcalTrigTowerDetId & | towerId | ) | const |
Gets the SR interest classification of a trigger tower (TT).
iEta | index of the TT along eta |
iPhi | index of the TT along phi |
Definition at line 177 of file EcalSelectiveReadout.cc.
References cms::cuda::assert(), L1TowerCalibrationProducer_cfi::iEta, nTriggerTowersInEta, and hgcalTowerProducer_cfi::tower.
Referenced by getCrystalInterest(), and runSelectiveReadout0().
void EcalSelectiveReadout::print | ( | std::ostream & | os | ) | const |
print out the map
Definition at line 266 of file EcalSelectiveReadout.cc.
References printBarrel(), and printEndcap().
Referenced by operator<<().
void EcalSelectiveReadout::printBarrel | ( | std::ostream & | os | ) | const |
Definition at line 277 of file EcalSelectiveReadout.cc.
References L1TowerCalibrationProducer_cfi::iEta, nBarrelTriggerTowersInEta, nEndcapTriggerTowersInEta, nTriggerTowersInPhi, and srpFlagMarker.
Referenced by print().
void EcalSelectiveReadout::printEndcap | ( | int | endcap, |
std::ostream & | s | ||
) | const |
Definition at line 287 of file EcalSelectiveReadout.cc.
References c, makeMuonMisalignmentScenario::endcap, getSuperCrystalInterest(), nSupercrystalXBins, nSupercrystalYBins, srpFlagMarker, UNKNOWN, and EcalScDetId::validDetId().
Referenced by print().
void EcalSelectiveReadout::printHeader | ( | std::ostream & | os | ) | const |
print out header for the map: see print(std::ostream&)
Definition at line 237 of file EcalSelectiveReadout.cc.
References srpFlagMarker.
Referenced by ntuplePrintersDiff.SeedPrinter::diff(), ntuplePrintersDiff.TrackPrinter::diff(), ntuplePrintersDiff.SeedPrinter::printSeed(), and ntuplePrintersDiff.TrackPrinter::printTrack().
|
private |
Sets all endcap RU interest flags to 'unknown'
Definition at line 23 of file EcalSelectiveReadout.cc.
References maxDccChs, nDccPerEe, nEndcaps, and UNKNOWN.
Referenced by runSelectiveReadout0().
void EcalSelectiveReadout::runSelectiveReadout0 | ( | const ttFlag_t | towerFlags[nTriggerTowersInEta][nTriggerTowersInPhi] | ) |
Selective readout algorithm type 0. The algorithm is the following:
For the barrel a crystal inherit the single/center/neighbour/low_interst classification of its TT. For the endcap,
An endcap crystal inherits the SRP flag of its SC.
triggerTowerEt | array of the transverse enrgy deposited in the trigger tower. First index is for eta,2nd index for phi. |
Definition at line 34 of file EcalSelectiveReadout.cc.
References cms::cuda::assert(), CENTER, classifyTriggerTowers(), combineFlags(), DetId::Ecal, EcalEndcap, eeRuInterest(), FORCED_MASK, getTowerInterest(), L1TowerCalibrationProducer_cfi::iEta, LOWINTEREST, nBarrelTriggerTowersInEta, NEIGHBOUR, nEndcapTriggerTowersInEta, nEndcapXBins, nEndcapYBins, nTriggerTowersInEta, nTriggerTowersInPhi, DetId::rawId(), resetEeRuInterest(), SINGLE, and EEDetId::validDetId().
|
inline |
the electronics map, used to get information about the DCC and DCC channel used to read a crystal channel
Definition at line 173 of file EcalSelectiveReadout.h.
References genParticles_cff::map.
Changes the value of a variable iff that has the effect to increase the variable value var = max(var,val)
var | the variable |
val | the new candidate value |
Definition at line 287 of file EcalSelectiveReadout.h.
References heppy_batch::val, and trigObjTnPSource_cfi::var.
|
inlineprivate |
Changes the value of a variable iff that has the effect to decrease the variable value var = min(var,val)
var | the variable |
val | the new candidate value |
Definition at line 275 of file EcalSelectiveReadout.h.
References heppy_batch::val, and trigObjTnPSource_cfi::var.
|
inline |
the mapping of which cell goes with which trigger tower
Definition at line 169 of file EcalSelectiveReadout.h.
References genParticles_cff::map.
|
static |
Definition at line 64 of file EcalSelectiveReadout.h.
Referenced by classifyTriggerTowers(), EcalSelectiveReadoutSuppressor::initCellThresholds(), and runSelectiveReadout0().
|
static |
Maximum number of DCC channels used from crystal channels (channel #69 and #70 used for MEM are not counted here)
Definition at line 148 of file EcalSelectiveReadout.h.
Referenced by eeRuInterest(), and resetEeRuInterest().
|
static |
Number of crystals along eta in barrel
Definition at line 104 of file EcalSelectiveReadout.h.
|
static |
Number of crystals in a eta ring of the barrel
Definition at line 107 of file EcalSelectiveReadout.h.
|
static |
Number of trigger tower along eta in the barrel
Definition at line 125 of file EcalSelectiveReadout.h.
|
static |
Number of trigger tower in a eta ring of the barrel
Definition at line 128 of file EcalSelectiveReadout.h.
|
static |
Number of barrel trigger towers along eta
Definition at line 137 of file EcalSelectiveReadout.h.
Referenced by printBarrel(), and runSelectiveReadout0().
|
static |
Number of DCC per endcap
Definition at line 152 of file EcalSelectiveReadout.h.
Referenced by eeRuInterest(), and resetEeRuInterest().
|
static |
Number of endcap, obviously tow
Definition at line 131 of file EcalSelectiveReadout.h.
Referenced by resetEeRuInterest().
|
static |
Number of trigger towers along eta in one endcap
Definition at line 134 of file EcalSelectiveReadout.h.
Referenced by printBarrel(), and runSelectiveReadout0().
|
static |
Range of the x-index of endcap crystals (xman-xmin+1).
Definition at line 110 of file EcalSelectiveReadout.h.
Referenced by runSelectiveReadout0().
|
static |
Range of the y-index of endcap crystals (yman-ymin+1).
Definition at line 113 of file EcalSelectiveReadout.h.
Referenced by runSelectiveReadout0().
|
static |
Range of endcap supercrystal x-index (xmax-xmin+1)
Definition at line 119 of file EcalSelectiveReadout.h.
Referenced by printEndcap().
|
static |
Range of endcap supercrystal y-index (ymay-ymin+1)
Definition at line 122 of file EcalSelectiveReadout.h.
Referenced by printEndcap().
|
static |
Number of trigger towers along eta for the whole ECAL
Definition at line 140 of file EcalSelectiveReadout.h.
Referenced by classifyTriggerTowers(), getTowerInterest(), EcalSelectiveReadoutProducer::printTTFlags(), EcalSelectiveReadoutSuppressor::printTTFlags(), and runSelectiveReadout0().
|
static |
Number of trigger towers in an eta ring
Definition at line 143 of file EcalSelectiveReadout.h.
Referenced by classifyTriggerTowers(), printBarrel(), EcalSelectiveReadoutProducer::printTTFlags(), EcalSelectiveReadoutSuppressor::printTTFlags(), and runSelectiveReadout0().
|
static |
Edge size of a supercrystal. A supercrystal is a tower of 5x5 crystals.
Definition at line 116 of file EcalSelectiveReadout.h.
|
static |
Definition at line 98 of file EcalSelectiveReadout.h.
Referenced by combineFlags().