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 Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
EcalSelectiveReadoutSuppressor Class Reference

#include <EcalSelectiveReadoutSuppressor.h>

Public Types

enum  { BARREL, ENDCAP }
 

Public Member Functions

 EcalSelectiveReadoutSuppressor (const edm::ParameterSet &params, const EcalSRSettings *settings)
 
EcalSelectiveReadoutgetEcalSelectiveReadout ()
 
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
 

Detailed Description

Definition at line 17 of file EcalSelectiveReadoutSuppressor.h.

Member Enumeration Documentation

anonymous enum
Enumerator
BARREL 
ENDCAP 

Definition at line 25 of file EcalSelectiveReadoutSuppressor.h.

Constructor & Destructor Documentation

EcalSelectiveReadoutSuppressor::EcalSelectiveReadoutSuppressor ( const edm::ParameterSet params,
const EcalSRSettings settings 
)

Construtor.

Parameters
paramsconfiguration from python file
settingsconfiguration from condition DB

Definition at line 30 of file EcalSelectiveReadoutSuppressor.cc.

Member Function Documentation

bool EcalSelectiveReadoutSuppressor::accept ( const edm::DataFrame frame,
int  thr 
)
private

Returns true if a digi passes the zero suppression.

Parameters
frame,dataframe (aka digi).
thrzero suppression threshold in thrUnit.
Returns
true if passed ZS filter, false if failed

Definition at line 215 of file EcalSelectiveReadoutSuppressor.cc.

Referenced by Vispa.Gui.BoxContentDialog.BoxContentDialog::apply().

template<class T >
double EcalSelectiveReadoutSuppressor::frame2Energy ( const T frame,
int  timeOffset = 0 
) const
private

Definition at line 559 of file EcalSelectiveReadoutSuppressor.cc.

EcalSelectiveReadout* EcalSelectiveReadoutSuppressor::getEcalSelectiveReadout ( )
inline

For debugging purposes.

Definition at line 84 of file EcalSelectiveReadoutSuppressor.h.

static int EcalSelectiveReadoutSuppressor::getFIRTapCount ( )
inlinestatic

Gets number of weights supported by the zero suppression filter

Returns
number of weights

Definition at line 30 of file EcalSelectiveReadoutSuppressor.h.

vector< int > EcalSelectiveReadoutSuppressor::getFIRWeigths ( )
private

Gets the integer weights used by the zero suppression FIR filter.

<U>Weight definitions:</U>

  • Uncalibrated normalized weights are defined as such that when applied to the average pulse with the highest sample normalized to 1, the result is 1.
  • Calibrated weights are defined for each crystal, as uncalibrated normalized weights multiplied by an intercalibration constant which is expected to be between 0.6 and 1.4
  • FIR weights are defined for each crystal as the closest signed integers to 2**10 times the calibrated weigths. The absolute value of these weights should not be greater than (2**12-1).

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.

int EcalSelectiveReadoutSuppressor::iEta2cIndex ( int  iEta) const
inlineprivate

Transforms CMSSW eta ECAL crystal indices to indices starting at 0 to use for c-array or vector.

Parameters
iEtaCMSSW eta index (numbering -85...-1,1...85)
Returns
index in numbering from 0 to 169

Definition at line 145 of file EcalSelectiveReadoutSuppressor.h.

void EcalSelectiveReadoutSuppressor::initCellThresholds ( double  barrelLowInterest,
double  endcapLowInterest,
double  barrelHighInterest,
double  endcapHighInterest 
)
private

helpers for constructors

Initializes ZS threshold and SR classificion to SR ("action") flags

Definition at line 121 of file EcalSelectiveReadoutSuppressor.cc.

int EcalSelectiveReadoutSuppressor::internalThreshold ( double  thresholdInGeV,
int  iSubDet 
) const
private

Converts threshold in GeV to threshold in internal unit used by the ZS FIR.

Parameters
thresholdInGeVthe theshold in GeV
iSubDet0 for barrel, 1 for endcap
Returns
threshold in thrUnit unit. INT_MAX means complete suppression, INT_MIN means no zero suppression.

Definition at line 194 of file EcalSelectiveReadoutSuppressor.cc.

int EcalSelectiveReadoutSuppressor::iPhi2cIndex ( int  iPhi) const
inlineprivate

Transforms CMSSW phi ECAL crystal indices to indices starting at 0 to use for c-array or vector.

Parameters
iPhiCMSSW phi index (numbering 1...360)
Returns
index in numbering 0...359

Definition at line 154 of file EcalSelectiveReadoutSuppressor.h.

int EcalSelectiveReadoutSuppressor::iTTEta2cIndex ( int  iEta) const
inlineprivate

Transforms CMSSW eta ECAL TT indices to indices starting at 0 to use for c-array or vector.

Parameters
iEtaCMSSW eta index (numbering -28...-1,28...56)
Returns
index in numbering from 0 to 55

Definition at line 163 of file EcalSelectiveReadoutSuppressor.h.

int EcalSelectiveReadoutSuppressor::iTTPhi2cIndex ( int  iPhi) const
inlineprivate

Transforms CMSSW phi ECAL crystal indices to indices starting at 0 to use for c-array or vector.

Parameters
iPhiCMSSW phi index (numbering 1...72)
Returns
index in numbering 0...71

Definition at line 172 of file EcalSelectiveReadoutSuppressor.h.

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.

Parameters
osstream to write to
iEventevent index. Ignored if <0.
withHeader.If true writes out a header with the legend.

Definition at line 599 of file EcalSelectiveReadoutSuppressor.cc.

void EcalSelectiveReadoutSuppressor::run ( const edm::EventSetup eventSetup,
const EcalTrigPrimDigiCollection trigPrims,
EBDigiCollection barrelDigis,
EEDigiCollection endcapDigis 
)

Runs the selective readout(SR) algorithm.

Parameters
eventSetupevent conditions
trigPrimsthe 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.

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.

Parameters
eventSetupevent conditions
trigPrimsthe ECAL trigger primitives used as input to the SR.
barrelDigisthe input EB digi collection
endcapDigisthe 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.

void EcalSelectiveReadoutSuppressor::setElecMap ( const EcalElectronicsMapping map)

Set the ECAL electronics mapping

Parameters
mapthe ECAL electronics map

Definition at line 108 of file EcalSelectiveReadoutSuppressor.cc.

void EcalSelectiveReadoutSuppressor::setGeometry ( const CaloGeometry caloGeometry)

Sets the geometry of the calorimeters

Definition at line 113 of file EcalSelectiveReadoutSuppressor.cc.

void EcalSelectiveReadoutSuppressor::setTriggerMap ( const EcalTrigTowerConstituentsMap map)

Set the mapping of which cell goes with which trigger tower

Parameters
mapthe trigger tower map

Definition at line 103 of file EcalSelectiveReadoutSuppressor.cc.

void EcalSelectiveReadoutSuppressor::setTtFlags ( const edm::EventSetup eventSetup,
const EBDigiCollection ebDigis,
const EEDigiCollection eeDigis 
)
private

Help function to set the srFlags field. Used in TrigPrimByPass mode

Parameters
eventSetupthe EDM event setup
ebDigithe ECAL barrel APD digis
eeDigithe ECAL endcap VPT digis

Definition at line 452 of file EcalSelectiveReadoutSuppressor.cc.

void EcalSelectiveReadoutSuppressor::setTtFlags ( const EcalTrigPrimDigiCollection trigPrims)
private

Help function to set the srFlags field.

Parameters
trigPrimthe trigger primitive digi collection

Definition at line 402 of file EcalSelectiveReadoutSuppressor.cc.

Member Data Documentation

std::vector<int> EcalSelectiveReadoutSuppressor::actions_
private

SR flag (low interest/single/neighbor/center) to action flag (suppress, ZS1, ZS2, FRO) map.

Definition at line 285 of file EcalSelectiveReadoutSuppressor.h.

EcalSelectiveReadout::ttFlag_t EcalSelectiveReadoutSuppressor::defaultTtf_
private

Default TTF to substitute if absent from the trigger primitive collection

Definition at line 319 of file EcalSelectiveReadoutSuppressor.h.

std::auto_ptr<EcalSelectiveReadout> EcalSelectiveReadoutSuppressor::ecalSelectiveReadout
private

Help class to comput selective readout flags.

Definition at line 227 of file EcalSelectiveReadoutSuppressor.h.

int EcalSelectiveReadoutSuppressor::firstFIRSample
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.

std::vector<int> EcalSelectiveReadoutSuppressor::firWeights
private

Weights of zero suppression FIR filter

Definition at line 242 of file EcalSelectiveReadoutSuppressor.h.

int EcalSelectiveReadoutSuppressor::ievt_
private

Number of produced events

Definition at line 323 of file EcalSelectiveReadoutSuppressor.h.

const size_t EcalSelectiveReadoutSuppressor::nBarrelTriggerTowersInEta = 34
staticprivate

Number of eta trigger tower divisions in the barrel.

Definition at line 213 of file EcalSelectiveReadoutSuppressor.h.

const size_t EcalSelectiveReadoutSuppressor::nEndcaps = 2
staticprivate

Help function to get SR flag from ZS threshold using min/max convention for SUPPRESS and FULL_READOUT: see zsThreshold.

Parameters
thrZS threshold in thrUnit
flagfor Zero suppression: EcalSrFlag::SRF_ZS1 or EcalSrFlag::SRF_ZS2
Returns
the SR flagNumber of endcap, obviously two.

Definition at line 205 of file EcalSelectiveReadoutSuppressor.h.

const size_t EcalSelectiveReadoutSuppressor::nEndcapTriggerTowersInEta = 11
staticprivate

Number of eta trigger tower divisions in one endcap.

Definition at line 209 of file EcalSelectiveReadoutSuppressor.h.

const int EcalSelectiveReadoutSuppressor::nFIRTaps = 6
staticprivate

Depth of DCC zero suppression FIR filter (number of taps), in principal 6.

Definition at line 247 of file EcalSelectiveReadoutSuppressor.h.

const size_t EcalSelectiveReadoutSuppressor::nTriggerTowersInEta = 2*nEndcapTriggerTowersInEta+nBarrelTriggerTowersInEta
staticprivate

Number of eta divisions in trigger towers for the whole ECAL

Definition at line 218 of file EcalSelectiveReadoutSuppressor.h.

const size_t EcalSelectiveReadoutSuppressor::nTriggerTowersInPhi = 72
staticprivate

Number of phi divisions in trigger towers.

Definition at line 222 of file EcalSelectiveReadoutSuppressor.h.

int EcalSelectiveReadoutSuppressor::srFlags[2][8]
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.

bool EcalSelectiveReadoutSuppressor::symetricZS
private

Flag to use a symetric zero suppression (cut on absolute value)

Definition at line 255 of file EcalSelectiveReadoutSuppressor.h.

const EcalTrigTowerConstituentsMap* EcalSelectiveReadoutSuppressor::theTriggerMap
private

Definition at line 229 of file EcalSelectiveReadoutSuppressor.h.

double EcalSelectiveReadoutSuppressor::thrUnit[2]
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.

bool EcalSelectiveReadoutSuppressor::trigPrimBypass_
private

Switch for trigger primitive simulation module bypass debug mode.

Definition at line 273 of file EcalSelectiveReadoutSuppressor.h.

double EcalSelectiveReadoutSuppressor::trigPrimBypassHTH_
private

Low TT Et threshold for trigger primitive simulation module bypass debug mode.

Definition at line 306 of file EcalSelectiveReadoutSuppressor.h.

double EcalSelectiveReadoutSuppressor::trigPrimBypassLTH_
private

Low TT Et threshold for trigger primitive simulation module bypass debug mode.

Definition at line 301 of file EcalSelectiveReadoutSuppressor.h.

int EcalSelectiveReadoutSuppressor::trigPrimBypassMode_
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

See Also
trigPrimByPass_ switch

Definition at line 280 of file EcalSelectiveReadoutSuppressor.h.

bool EcalSelectiveReadoutSuppressor::trigPrimBypassWithPeakFinder_
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.

EcalSelectiveReadout::ttFlag_t EcalSelectiveReadoutSuppressor::ttFlags[nTriggerTowersInEta][nTriggerTowersInPhi]
private

Trigger tower flags: see setTtFlags()

Definition at line 233 of file EcalSelectiveReadoutSuppressor.h.

bool EcalSelectiveReadoutSuppressor::ttThresOnCompressedEt_
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.

std::vector<float> EcalSelectiveReadoutSuppressor::weights
private

DCC zero suppression FIR filter uncalibrated normalized weigths

Definition at line 251 of file EcalSelectiveReadoutSuppressor.h.

int EcalSelectiveReadoutSuppressor::zsThreshold[2][8]
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.