CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes
EcalSelectiveReadout Class Reference

#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
 
static const int maxDccChs = 68
 
static const size_t nBarrelEtaBins = 170
 
static const size_t nBarrelPhiBins = 360
 
static const size_t nBarrelTowerEtaBins = nBarrelEtaBins/5
 
static const size_t nBarrelTowerPhiBins = nBarrelPhiBins/5
 
static const size_t nBarrelTriggerTowersInEta = 34
 
static const int nDccPerEe = 9
 
static const size_t nEndcaps = 2
 
static const size_t nEndcapTriggerTowersInEta = 11
 
static const size_t nEndcapXBins = 100
 
static const size_t nEndcapYBins = 100
 
static const size_t nSupercrystalXBins = nEndcapXBins/supercrystalEdge
 
static const size_t nSupercrystalYBins = nEndcapYBins/supercrystalEdge
 
static const size_t nTriggerTowersInEta
 
static const size_t nTriggerTowersInPhi = 72
 
static const 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_teeRuInterest (const EEDetId &id)
 
towerInterest_teeRuInterest (const EcalScDetId &id)
 
void printDccChMap (std::ostream &os) const
 
void resetEeRuInterest ()
 
template<class T >
void setHigher (T &var, T val) const
 
void setLower (int &var, int val) const
 

Private Attributes

int dEta
 
int dPhi
 
towerInterest_t eeRuInterest_ [nEndcaps][nDccPerEe][maxDccChs]
 
const EcalElectronicsMappingtheElecMap
 
const
EcalTrigTowerConstituentsMap
theTriggerMap
 
towerInterest_t towerInterest [nTriggerTowersInEta][nTriggerTowersInPhi]
 

Static Private Attributes

static const char srpFlagMarker []
 

Detailed Description

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.

Note: Forced bit processing:

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 64 of file EcalSelectiveReadout.h.

Member Enumeration Documentation

trigger tower classification ("SRP flags")

Enumerator
UNKNOWN 
LOWINTEREST 
SINGLE 
NEIGHBOUR 
CENTER 
FORCED_LOWINTEREST 
FORCED_SINGLE 
FORCED_NEIGHBOUR 
FORCED_CENTER 

Definition at line 71 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 82 of file EcalSelectiveReadout.h.

Constructor & Destructor Documentation

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.

Parameters
dEtaneighborhood extend in number of trigger towers along eta
dPhineighborgooh 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 21 of file EcalSelectiveReadout.cc.

Member Function Documentation

void EcalSelectiveReadout::classifyTriggerTowers ( const ttFlag_t  ttFlags[nTriggerTowersInEta][nTriggerTowersInPhi])
private

Classifies trigger tower in three classes:

  • low interest: value 'lowInterest'
  • middle interest: value 'single'
  • high interest: value 'center'

Definition at line 215 of file EcalSelectiveReadout.cc.

template<class T >
void EcalSelectiveReadout::combineFlags ( T var,
T  val 
) const
inlineprivate

Combine two flags. Forced bit and actual flag fields are treated separately. For both fields, the highst value is selected.

Parameters
var[in,out] flag to change in place
valflag to combine with the first.
Template Parameters
TtowerInterest_t or

Definition at line 310 of file EcalSelectiveReadout.h.

EcalSelectiveReadout::towerInterest_t & EcalSelectiveReadout::eeRuInterest ( const EEDetId id)
private

Get access to eeRuInterest element corresponding to an EE det Id

Parameters
idthe EE det id
Returns
reference to the eeRuInterest array element

Definition at line 169 of file EcalSelectiveReadout.cc.

EcalSelectiveReadout::towerInterest_t & EcalSelectiveReadout::eeRuInterest ( const EcalScDetId id)
private

Get access to eeRuInterest element corresponding to an SC det Id

Parameters
idthe SC det id
Returns
reference to the eeRuInterest array element

Definition at line 186 of file EcalSelectiveReadout.cc.

EcalSelectiveReadout::towerInterest_t EcalSelectiveReadout::getCrystalInterest ( const EBDetId ebDetId) const

Gets the SR interest classification of an EB channel

Parameters
ebDetIdid of the crystal
interest

Definition at line 145 of file EcalSelectiveReadout.cc.

EcalSelectiveReadout::towerInterest_t EcalSelectiveReadout::getCrystalInterest ( const EEDetId eeDetId) const

Gets the SR interest classification of an EE channel

Parameters
eeDetIdid of the crystal
Returns
interest

Definition at line 153 of file EcalSelectiveReadout.cc.

EcalSelectiveReadout::towerInterest_t EcalSelectiveReadout::getSuperCrystalInterest ( const EcalScDetId scDetId) const

Gets the SR interest classification of an EE supercrystal

Parameters
scDetIdid of the crystal
Returns
interest

Definition at line 163 of file EcalSelectiveReadout.cc.

EcalSelectiveReadout::towerInterest_t EcalSelectiveReadout::getTowerInterest ( const EcalTrigTowerDetId towerId) const

Gets the SR interest classification of a trigger tower (TT).

Parameters
iEtaindex of the TT along eta
iPhiindex of the TT along phi
Returns
interest

Definition at line 202 of file EcalSelectiveReadout.cc.

void EcalSelectiveReadout::print ( std::ostream &  os) const

print out the map

Definition at line 285 of file EcalSelectiveReadout.cc.

void EcalSelectiveReadout::printBarrel ( std::ostream &  os) const

Definition at line 298 of file EcalSelectiveReadout.cc.

void EcalSelectiveReadout::printDccChMap ( std::ostream &  os) const
private

Propagate TTF flag bit on towerInterest. TT interest forced bit is set if TTF forced bit is set, otherwise it is not touched.

Parameters
ttFlagsTT flags

Definition at line 343 of file EcalSelectiveReadout.cc.

void EcalSelectiveReadout::printEndcap ( int  endcap,
std::ostream &  s 
) const

Definition at line 314 of file EcalSelectiveReadout.cc.

void EcalSelectiveReadout::printHeader ( std::ostream &  os) const

print out header for the map: see print(std::ostream&)

Definition at line 272 of file EcalSelectiveReadout.cc.

void EcalSelectiveReadout::resetEeRuInterest ( )
private

Sets all endcap RU interest flags to 'unknown'

Definition at line 25 of file EcalSelectiveReadout.cc.

void EcalSelectiveReadout::runSelectiveReadout0 ( const ttFlag_t  towerFlags[nTriggerTowersInEta][nTriggerTowersInPhi])

Selective readout algorithm type 0. The algorithm is the following:

  1. A trigger tower (TT) with Et higher than the high threshold is classified as 'center'
  2. A trigger tower which is a neighbour of a 'center' TT and which is not itself a 'center' is classified as 'neighbour'
  3. A TT with Et between the two threshold and which is not a 'center' or a 'neighbour' is classified as 'single'
  4. Any other TT are classified as 'low interest'

For the barrel a crystal inherit the single/center/neighbour/low_interst classification of its TT. For the endcap,

  • if the supercrystal overlaps with a 'center' TT, it's flagged as 'center'
  • otherwise if it overlaps with a 'neighbour' TT, it's flagged as 'neighbour'
  • else if it overlaps with a 'single' TT, it's flagged as 'single'
  • the remaining SC are flagged as 'low interest'

An endcap crystal inherits the SRP flag of its SC.

Parameters
triggerTowerEtarray of the transverse enrgy deposited in the trigger tower. First index is for eta,2nd index for phi.

Definition at line 37 of file EcalSelectiveReadout.cc.

void EcalSelectiveReadout::setElecMap ( const EcalElectronicsMapping map)
inline

the electronics map, used to get information about the DCC and DCC channel used to read a crystal channel

Definition at line 178 of file EcalSelectiveReadout.h.

template<class T >
void EcalSelectiveReadout::setHigher ( T var,
T  val 
) const
inlineprivate

Changes the value of a variable iff that has the effect to increase the variable value var = max(var,val)

Parameters
varthe variable
valthe new candidate value

Definition at line 299 of file EcalSelectiveReadout.h.

void EcalSelectiveReadout::setLower ( int &  var,
int  val 
) const
inlineprivate

Changes the value of a variable iff that has the effect to decrease the variable value var = min(var,val)

Parameters
varthe variable
valthe new candidate value

Definition at line 288 of file EcalSelectiveReadout.h.

void EcalSelectiveReadout::setTriggerMap ( const EcalTrigTowerConstituentsMap map)
inline

the mapping of which cell goes with which trigger tower

Definition at line 172 of file EcalSelectiveReadout.h.

Member Data Documentation

int EcalSelectiveReadout::dEta
private

Definition at line 356 of file EcalSelectiveReadout.h.

int EcalSelectiveReadout::dPhi
private

Definition at line 357 of file EcalSelectiveReadout.h.

towerInterest_t EcalSelectiveReadout::eeRuInterest_[nEndcaps][nDccPerEe][maxDccChs]
private

Definition at line 355 of file EcalSelectiveReadout.h.

const int EcalSelectiveReadout::FORCED_MASK = 0x4
static

Definition at line 66 of file EcalSelectiveReadout.h.

const int EcalSelectiveReadout::maxDccChs = 68
static

Maximum number of DCC channels used from crystal channels (channel #69 and #70 used for MEM are not counted here)

Definition at line 151 of file EcalSelectiveReadout.h.

const size_t EcalSelectiveReadout::nBarrelEtaBins = 170
static

Number of crystals along eta in barrel

Definition at line 106 of file EcalSelectiveReadout.h.

const size_t EcalSelectiveReadout::nBarrelPhiBins = 360
static

Number of crystals in a eta ring of the barrel

Definition at line 109 of file EcalSelectiveReadout.h.

const size_t EcalSelectiveReadout::nBarrelTowerEtaBins = nBarrelEtaBins/5
static

Number of trigger tower along eta in the barrel

Definition at line 127 of file EcalSelectiveReadout.h.

const size_t EcalSelectiveReadout::nBarrelTowerPhiBins = nBarrelPhiBins/5
static

Number of trigger tower in a eta ring of the barrel

Definition at line 130 of file EcalSelectiveReadout.h.

const size_t EcalSelectiveReadout::nBarrelTriggerTowersInEta = 34
static

Number of barrel trigger towers along eta

Definition at line 139 of file EcalSelectiveReadout.h.

const int EcalSelectiveReadout::nDccPerEe = 9
static

Number of DCC per endcap

Definition at line 155 of file EcalSelectiveReadout.h.

const size_t EcalSelectiveReadout::nEndcaps = 2
static

Number of endcap, obviously tow

Definition at line 133 of file EcalSelectiveReadout.h.

const size_t EcalSelectiveReadout::nEndcapTriggerTowersInEta = 11
static

Number of trigger towers along eta in one endcap

Definition at line 136 of file EcalSelectiveReadout.h.

const size_t EcalSelectiveReadout::nEndcapXBins = 100
static

Range of the x-index of endcap crystals (xman-xmin+1).

Definition at line 112 of file EcalSelectiveReadout.h.

const size_t EcalSelectiveReadout::nEndcapYBins = 100
static

Range of the y-index of endcap crystals (yman-ymin+1).

Definition at line 115 of file EcalSelectiveReadout.h.

const size_t EcalSelectiveReadout::nSupercrystalXBins = nEndcapXBins/supercrystalEdge
static

Range of endcap supercrystal x-index (xmax-xmin+1)

Definition at line 121 of file EcalSelectiveReadout.h.

const size_t EcalSelectiveReadout::nSupercrystalYBins = nEndcapYBins/supercrystalEdge
static

Range of endcap supercrystal y-index (ymay-ymin+1)

Definition at line 124 of file EcalSelectiveReadout.h.

const size_t EcalSelectiveReadout::nTriggerTowersInEta
static
Initial value:

Number of trigger towers along eta for the whole ECAL

Definition at line 142 of file EcalSelectiveReadout.h.

const size_t EcalSelectiveReadout::nTriggerTowersInPhi = 72
static

Number of trigger towers in an eta ring

Definition at line 146 of file EcalSelectiveReadout.h.

const char EcalSelectiveReadout::srpFlagMarker
staticprivate
Initial value:
= {'.', 'S', 'N', 'C',
'4', '5', '6', '7'}

Definition at line 360 of file EcalSelectiveReadout.h.

const size_t EcalSelectiveReadout::supercrystalEdge = 5
static

Edge size of a supercrystal. A supercrystal is a tower of 5x5 crystals.

Definition at line 118 of file EcalSelectiveReadout.h.

const EcalElectronicsMapping* EcalSelectiveReadout::theElecMap
private

Definition at line 348 of file EcalSelectiveReadout.h.

const EcalTrigTowerConstituentsMap* EcalSelectiveReadout::theTriggerMap
private

Definition at line 347 of file EcalSelectiveReadout.h.

towerInterest_t EcalSelectiveReadout::towerInterest[nTriggerTowersInEta][nTriggerTowersInPhi]
private

Definition at line 353 of file EcalSelectiveReadout.h.

const int EcalSelectiveReadout::TTF_FORCED_RO_MASK = FORCED_MASK
static

Definition at line 99 of file EcalSelectiveReadout.h.