CMS 3D CMS Logo

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, 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< EcalSelectiveReadoutecalSelectiveReadout
 
int firstFIRSample
 
std::vector< int > firWeights
 
int ievt_
 
int srFlags [2][8]
 
bool symetricZS
 
const EcalTrigTowerConstituentsMaptheTriggerMap
 
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
 

Detailed Description

Definition at line 17 of file EcalSelectiveReadoutSuppressor.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
BARREL 
ENDCAP 

Definition at line 25 of file EcalSelectiveReadoutSuppressor.h.

25 { BARREL, ENDCAP };

Constructor & Destructor Documentation

◆ EcalSelectiveReadoutSuppressor()

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

Construtor.

Parameters
paramsconfiguration from python file
settingsconfiguration from condition DB

Definition at line 31 of file EcalSelectiveReadoutSuppressor.cc.

33  : ttThresOnCompressedEt_(false), ievt_(0) {
34  firstFIRSample = settings->ecalDccZs1stSample_[0];
35  weights = settings->dccNormalizedWeights_[0];
36  symetricZS = settings->symetricZS_[0];
37  actions_ = settings->actions_;
38 
39  int defTtf = params.getParameter<int>("defaultTtf");
40  if (defTtf < 0 || defTtf > 7) {
41  throw cms::Exception("InvalidParameter") << "Value of EcalSelectiveReadoutProducer module parameter defaultTtf, "
42  << defaultTtf_ << ", is out of the valid range 0..7\n";
43  } else {
45  }
46 
47  //online configuration has only 4 actions flags, the 4 'forced' flags being the same with the force
48  //bit set to 1. Extends the actions vector for case of online-type configuration:
49  if (actions_.size() == 4) {
50  for (int i = 0; i < 4; ++i) {
51  actions_.push_back(actions_[i] | 0x4);
52  }
53  }
54 
55  bool actionValid = actions_.size() == 8;
56  for (size_t i = 0; i < actions_.size(); ++i) {
57  if (actions_[i] < 0 || actions_[i] > 7)
58  actionValid = false;
59  }
60 
61  if (!actionValid) {
62  throw cms::Exception("InvalidParameter")
63  << "EcalSelectiveReadoutProducer module parameter 'actions' is "
64  "not valid. It must be a vector of 8 integer values comprised between 0 and 7\n";
65  }
66 
67  double adcToGeV = settings->ebDccAdcToGeV_;
68  thrUnit[BARREL] = adcToGeV / 4.; //unit=1/4th ADC count
69 
70  adcToGeV = settings->eeDccAdcToGeV_;
71  thrUnit[ENDCAP] = adcToGeV / 4.; //unit=1/4th ADC count
72  ecalSelectiveReadout = std::make_unique<EcalSelectiveReadout>(settings->deltaEta_[0], settings->deltaPhi_[0]);
73  const int eb = 0;
74  const int ee = 1;
76  settings->srpLowInterestChannelZS_[ee],
77  settings->srpHighInterestChannelZS_[eb],
78  settings->srpHighInterestChannelZS_[ee]);
79  trigPrimBypass_ = params.getParameter<bool>("trigPrimBypass");
80  trigPrimBypassMode_ = params.getParameter<int>("trigPrimBypassMode");
81  trigPrimBypassWithPeakFinder_ = params.getParameter<bool>("trigPrimBypassWithPeakFinder");
82  trigPrimBypassLTH_ = params.getParameter<double>("trigPrimBypassLTH");
83  trigPrimBypassHTH_ = params.getParameter<double>("trigPrimBypassHTH");
84  if (trigPrimBypass_) {
85  edm::LogWarning("Digitization") << "Beware a simplified trigger primitive "
86  "computation is used for the ECAL selective readout";
87  if (trigPrimBypassMode_ != 0 && trigPrimBypassMode_ != 1) {
88  throw cms::Exception("InvalidParameter")
89  << "Invalid value for EcalSelectiveReadoutProducer parameter 'trigPrimBypassMode_'."
90  " Valid values are 0 and 1.\n";
91  }
93  }
94 }

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.

Member Function Documentation

◆ accept()

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 208 of file EcalSelectiveReadoutSuppressor.cc.

208  {
209  //FIR filter weights:
210  const vector<int>& w = getFIRWeigths();
211 
212  //accumulator used to compute weighted sum of samples
213  int acc = 0;
214  bool gain12saturated = false;
215  const int gain12 = 0x01;
216  const int lastFIRSample = firstFIRSample + nFIRTaps - 1;
217  //LogDebug("DccFir") << "DCC FIR operation: ";
218  int iWeight = 0;
219  for (int iSample = firstFIRSample - 1; iSample < lastFIRSample; ++iSample, ++iWeight) {
220  if (iSample >= 0 && iSample < (int)frame.size()) {
221  EcalMGPASample sample(frame[iSample]);
222  if (sample.gainId() != gain12)
223  gain12saturated = true;
224  //LogTrace("DccFir") << (iSample>=firstFIRSample?"+":"") << sample.adc()
225  // << "*(" << w[iWeight] << ")";
226  acc += sample.adc() * w[iWeight];
227  } else {
228  edm::LogWarning("DccFir") << __FILE__ << ":" << __LINE__
229  << ": Not enough samples in data frame or 'ecalDccZs1stSample' module "
230  "parameter is not valid...";
231  }
232  }
233 
234  if (symetricZS) { //cut on absolute value
235  if (acc < 0)
236  acc = -acc;
237  }
238 
239  //LogTrace("DccFir") << "\n";
240  //discards the 8 LSBs
241  //(result of shift operator on negative numbers depends on compiler
242  //implementation, therefore the value is offset to make sure it is positive
243  //before performing the bit shift).
244  acc = ((acc + (1 << 30)) >> 8) - (1 << (30 - 8));
245 
246  //ZS passed if weigthed sum acc above ZS threshold or if
247  //one sample has a lower gain than gain 12 (that is gain 12 output
248  //is saturated)
249 
250  const bool result = (acc >= thr) || gain12saturated;
251 
252  //LogTrace("DccFir") << "acc: " << acc << "\n"
253  // << "threshold: " << thr << " ("
254  // << thr*thrUnit[((EcalDataFrame&)frame).id().subdetId()==EcalBarrel?0:1]
255  // << "GeV)\n"
256  // << "saturated: " << (gain12saturated?"yes":"no") << "\n"
257  // << "ZS passed: " << (result?"yes":"no")
258  // << (symetricZS?" (symetric cut)":"") << "\n";
259 
260  return result;
261 }

References firstFIRSample, amptDefault_cfi::frame, getFIRWeigths(), nFIRTaps, mps_fire::result, simplePhotonAnalyzer_cfi::sample, symetricZS, and w.

Referenced by esMonitoring.FDJsonServer::handle_accept(), and run().

◆ frame2Energy()

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

Definition at line 534 of file EcalSelectiveReadoutSuppressor.cc.

534  {
535  //we have to start by 0 in order to handle offset=-1
536  //(however Fenix FIR has AFAK only 5 taps)
537  double weights[] = {0., -1 / 3., -1 / 3., -1 / 3., 0., 1.};
538 
539  double adc2GeV = 0.;
540  if (typeid(frame) == typeid(EBDataFrame)) {
541  adc2GeV = 0.035;
542  } else if (typeid(frame) == typeid(EEDataFrame)) {
543  adc2GeV = 0.060;
544  } else { //T is an invalid type!
545  //TODO: replace message by a cms exception
546  cerr << "Severe error. " << __FILE__ << ":" << __LINE__ << ": "
547  << "this is a bug. Please report it.\n";
548  }
549 
550  double acc = 0;
551 
552  const int n = min<int>(frame.size(), sizeof(weights) / sizeof(weights[0]));
553 
554  double gainInv[] = {12., 1., 6., 12.};
555 
556  //cout << __PRETTY_FUNCTION__ << ": ";
557  for (int i = offset; i < n; ++i) {
558  int iframe = i + offset;
559  if (iframe >= 0 && iframe < frame.size()) {
560  acc += weights[i] * frame[iframe].adc() * gainInv[frame[iframe].gainId()] * adc2GeV;
561  //cout << (iframe>offset?"+":"")
562  // << frame[iframe].adc() << "*" << gainInv[frame[iframe].gainId()]
563  // << "*" << adc2GeV << "*(" << weights[i] << ")";
564  }
565  }
566  //cout << "\n";
567  return acc;
568 }

References EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0::cerr, amptDefault_cfi::frame, mps_fire::i, dqmiodumpmetadata::n, hltrates_dqm_sourceclient-live_cfg::offset, and weights.

Referenced by setTtFlags().

◆ getEcalSelectiveReadout()

EcalSelectiveReadout* EcalSelectiveReadoutSuppressor::getEcalSelectiveReadout ( )
inline

For debugging purposes.

Definition at line 83 of file EcalSelectiveReadoutSuppressor.h.

83 { return ecalSelectiveReadout.get(); }

References ecalSelectiveReadout.

◆ getFIRTapCount()

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.

30 { return nFIRTaps; }

References nFIRTaps.

Referenced by EcalSelectiveReadoutProducer::checkWeights().

◆ getFIRWeigths()

vector< int > EcalSelectiveReadoutSuppressor::getFIRWeigths ( )
private

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

Weight definitions:

  • 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 421 of file EcalSelectiveReadoutSuppressor.cc.

421  {
422  if (firWeights.empty()) {
423  firWeights = vector<int>(nFIRTaps, 0); //default weight: 0;
424  const static int maxWeight = 0xEFF; //weights coded on 11+1 signed bits
425  for (unsigned i = 0; i < min((size_t)nFIRTaps, weights.size()); ++i) {
426  firWeights[i] = lround(weights[i] * (1 << 10));
427  if (abs(firWeights[i]) > maxWeight) { //overflow
428  firWeights[i] = firWeights[i] < 0 ? -maxWeight : maxWeight;
429  }
430  }
431  }
432  return firWeights;
433 }

References funct::abs(), firWeights, mps_fire::i, min(), nFIRTaps, and weights.

Referenced by accept().

◆ iEta2cIndex()

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 142 of file EcalSelectiveReadoutSuppressor.h.

142 { return (iEta < 0) ? iEta + 85 : iEta + 84; }

References L1TowerCalibrationProducer_cfi::iEta.

◆ initCellThresholds()

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 111 of file EcalSelectiveReadoutSuppressor.cc.

114  {
115  //center, neighbour and single RUs are grouped into a single
116  //'high interest' group
117  int lowInterestThr[2]; //index for BARREL/ENDCAP
118  // int lowInterestSrFlag[2];
119  int highInterestThr[2];
120  // int highInterestSrFlag[2];
121 
122  lowInterestThr[BARREL] = internalThreshold(barrelLowInterest, BARREL);
123  // lowInterestSrFlag[BARREL] = thr2Srf(lowInterestThr[BARREL],
124  // EcalSrFlag::SRF_ZS1);
125 
126  highInterestThr[BARREL] = internalThreshold(barrelHighInterest, BARREL);
127  // highInterestSrFlag[BARREL] = thr2Srf(highInterestThr[BARREL],
128  // EcalSrFlag::SRF_ZS2);
129 
130  lowInterestThr[ENDCAP] = internalThreshold(endcapLowInterest, ENDCAP);
131  //lowInterestSrFlag[ENDCAP] = thr2Srf(lowInterestThr[ENDCAP],
132  // EcalSrFlag::SRF_ZS1);
133 
134  highInterestThr[ENDCAP] = internalThreshold(endcapHighInterest, ENDCAP);
135  // highInterestSrFlag[ENDCAP] = thr2Srf(highInterestThr[ENDCAP],
136  // EcalSrFlag::SRF_ZS2);
137 
138  const int FORCED_MASK = EcalSelectiveReadout::FORCED_MASK;
139 
140  for (int iSubDet = 0; iSubDet < 2; ++iSubDet) {
141  //low interest
142  //zsThreshold[iSubDet][0] = lowInterestThr[iSubDet];
143  //srFlags[iSubDet][0] = lowInterestSrFlag[iSubDet];
144  //srFlags[iSubDet][0 + FORCED_MASK] = FORCED_MASK | lowInterestSrFlag[iSubDet];
145 
146  //single->high interest
147  //zsThreshold[iSubDet][1] = highInterestThr[iSubDet];
148  //srFlags[iSubDet][1] = highInterestSrFlag[iSubDet];
149  //srFlags[iSubDet][1 + FORCED_MASK] = FORCED_MASK | highInterestSrFlag[iSubDet];
150 
151  //neighbour->high interest
152  //zsThreshold[iSubDet][2] = highInterestThr[iSubDet];
153  //srFlags[iSubDet][2] = highInterestSrFlag[iSubDet];
154  //srFlags[iSubDet][2 + FORCED_MASK] = FORCED_MASK | highInterestSrFlag[iSubDet];
155 
156  //center->high interest
157  //zsThreshold[iSubDet][3] = highInterestThr[iSubDet];
158  //srFlags[iSubDet][3] = highInterestSrFlag[iSubDet];
159  //srFlags[iSubDet][3 + FORCED_MASK] = FORCED_MASK | highInterestSrFlag[iSubDet];
160  for (size_t i = 0; i < 8; ++i) {
161  srFlags[iSubDet][i] = actions_[i];
162  if ((actions_[i] & ~FORCED_MASK) == 0)
163  zsThreshold[iSubDet][i] = numeric_limits<int>::max();
164  else if ((actions_[i] & ~FORCED_MASK) == 1)
165  zsThreshold[iSubDet][i] = lowInterestThr[iSubDet];
166  else if ((actions_[i] & ~FORCED_MASK) == 2)
167  zsThreshold[iSubDet][i] = highInterestThr[iSubDet];
168  else
169  zsThreshold[iSubDet][i] = numeric_limits<int>::min();
170  }
171 
172  // for(size_t i = 0; i < 8; ++i){
173  // cout << "zsThreshold[" << iSubDet << "][" << i << "] = " << zsThreshold[iSubDet][i] << endl;
174  // }
175  }
176 }

References actions_, BARREL, ENDCAP, EcalSelectiveReadout::FORCED_MASK, mps_fire::i, internalThreshold(), SiStripPI::max, min(), srFlags, and zsThreshold.

Referenced by EcalSelectiveReadoutSuppressor().

◆ internalThreshold()

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 188 of file EcalSelectiveReadoutSuppressor.cc.

188  {
189  double thr_ = thresholdInGeV / thrUnit[iSubDet];
190  //treating over- and underflows, threshold is coded on 11+1 signed bits
191  //an underflow threshold is considered here as if NoRO DCC switch is on
192  //an overflow threshold is considered here as if ForcedRO DCC switch in on
193  //Beware that conparison must be done on a double type, because conversion
194  //cast to an int of a double higher than MAX_INT is undefined.
195  int thr;
196  if (thr_ >= 0x7FF + .5) {
197  thr = numeric_limits<int>::max();
198  } else if (thr_ <= -0x7FF - .5) {
199  thr = numeric_limits<int>::min();
200  } else {
201  thr = lround(thr_);
202  }
203  return thr;
204 }

References SiStripPI::max, min(), and thrUnit.

Referenced by initCellThresholds().

◆ iPhi2cIndex()

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 149 of file EcalSelectiveReadoutSuppressor.h.

149 { return iPhi - 1; }

◆ iTTEta2cIndex()

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 156 of file EcalSelectiveReadoutSuppressor.h.

156 { return (iEta < 0) ? iEta + 28 : iEta + 27; }

References L1TowerCalibrationProducer_cfi::iEta.

Referenced by setTtFlags().

◆ iTTPhi2cIndex()

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 163 of file EcalSelectiveReadoutSuppressor.h.

163 { return iPhi - 1; }

Referenced by setTtFlags().

◆ printTTFlags()

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 570 of file EcalSelectiveReadoutSuppressor.cc.

570  {
571  const char tccFlagMarker[] = {'?', '.', 'S', '?', 'C', 'E', 'E', 'E', 'E'};
574 
575  if (withHeader) {
576  os << "# TCC flag map\n#\n"
577  "# +-->Phi "
578  << tccFlagMarker[1 + 0]
579  << ": 000 (low interest)\n"
580  "# | "
581  << tccFlagMarker[1 + 1]
582  << ": 001 (mid interest)\n"
583  "# | "
584  << tccFlagMarker[1 + 2]
585  << ": 010 (not valid)\n"
586  "# V Eta "
587  << tccFlagMarker[1 + 3]
588  << ": 011 (high interest)\n"
589  "# "
590  << tccFlagMarker[1 + 4] << ": 1xx forced readout (Hw error)\n";
591  }
592 
593  if (iEvent >= 0) {
594  os << "#\n#Event " << iEvent << "\n";
595  }
596 
597  for (int iEta = 0; iEta < nEta; ++iEta) {
598  for (int iPhi = 0; iPhi < nPhi; ++iPhi) {
599  os << tccFlagMarker[ttFlags[iEta][iPhi] + 1];
600  }
601  os << "\n";
602  }
603 }

References L1TowerCalibrationProducer_cfi::iEta, iEvent, HLT_FULL_cff::nEta, HLT_FULL_cff::nPhi, EcalSelectiveReadout::nTriggerTowersInEta, EcalSelectiveReadout::nTriggerTowersInPhi, tccFlagMarker, and ttFlags.

◆ run() [1/2]

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 277 of file EcalSelectiveReadoutSuppressor.cc.

284  {
285  ++ievt_;
286  if (!trigPrimBypass_ || ttThresOnCompressedEt_) { //uses output of TPG emulator
287  setTtFlags(trigPrims);
288  } else { //debug mode, run w/o TP digis
289  setTtFlags(eventSetup, barrelDigis, endcapDigis);
290  }
291 
292  ecalSelectiveReadout->runSelectiveReadout0(ttFlags);
293 
294  if (selectedBarrelDigis) {
295  selectedBarrelDigis->reserve(barrelDigis.size() / 20);
296 
297  // do barrel first
298  for (EBDigiCollection::const_iterator digiItr = barrelDigis.begin(); digiItr != barrelDigis.end(); ++digiItr) {
299  int interestLevel = ecalSelectiveReadout->getCrystalInterest(EBDigiCollection::DetId(digiItr->id())) &
300  ~EcalSelectiveReadout::FORCED_MASK;
301  if (accept(*digiItr, zsThreshold[BARREL][interestLevel])) {
302  selectedBarrelDigis->push_back(digiItr->id(), digiItr->begin());
303  }
304  }
305  }
306 
307  // and endcaps
308  if (selectedEndcapDigis) {
309  selectedEndcapDigis->reserve(endcapDigis.size() / 20);
310  for (EEDigiCollection::const_iterator digiItr = endcapDigis.begin(); digiItr != endcapDigis.end(); ++digiItr) {
311  int interestLevel = ecalSelectiveReadout->getCrystalInterest(EEDigiCollection::DetId(digiItr->id())) &
312  ~EcalSelectiveReadout::FORCED_MASK;
313  if (accept(*digiItr, zsThreshold[ENDCAP][interestLevel])) {
314  selectedEndcapDigis->push_back(digiItr->id(), digiItr->begin());
315  }
316  }
317  }
318 
319  if (ievt_ <= 10) {
320  int neb = (selectedBarrelDigis ? selectedBarrelDigis->size() : 0);
321  if (selectedEndcapDigis)
322  LogDebug("EcalSelectiveReadout")
323  // << __FILE__ << ":" << __LINE__ << ": "
324  << "Number of EB digis passing the SR: " << neb << " / " << barrelDigis.size() << "\n";
325  if (selectedEndcapDigis)
326  LogDebug("EcalSelectiveReadout")
327  // << __FILE__ << ":" << __LINE__ << ": "
328  << "\nNumber of EE digis passing the SR: " << selectedEndcapDigis->size() << " / " << endcapDigis.size()
329  << "\n";
330  }
331 
332  if (ebSrFlags)
333  ebSrFlags->reserve(34 * 72);
334  if (eeSrFlags)
335  eeSrFlags->reserve(624);
336  //SR flags:
337  for (int iZ = -1; iZ <= 1; iZ += 2) { //-1=>EE-, EB-, +1=>EE+, EB+
338  //barrel:
339  for (unsigned iEta = 1; iEta <= nBarrelTriggerTowersInEta / 2; ++iEta) {
340  for (unsigned iPhi = 1; iPhi <= nTriggerTowersInPhi; ++iPhi) {
341  const EcalTrigTowerDetId id(iZ, EcalBarrel, iEta, iPhi);
342  EcalSelectiveReadout::towerInterest_t interest = ecalSelectiveReadout->getTowerInterest(id);
343  if (interest < 0) {
344  throw cms::Exception("EcalSelectiveReadout") << __FILE__ << ":" << __LINE__ << ": "
345  << "unknown SR flag. for "
346  << " TT " << id << ". Most probably a bug.";
347  }
348  int flag;
349  // if(interest==EcalSelectiveReadout::FORCED_RO){
350  // flag = EcalSrFlag::SRF_FORCED_MASK | EcalSrFlag::SRF_FULL;
351  //} else{
352  flag = srFlags[BARREL][interest];
353  //}
354  if (ebSrFlags)
355  ebSrFlags->push_back(EBSrFlag(id, flag));
356  } //next iPhi
357  } //next barrel iEta
358 
359  //endcap:
360  EcalScDetId id;
361  for (int iX = 1; iX <= 20; ++iX) {
362  for (int iY = 1; iY <= 20; ++iY) {
363  if (EcalScDetId::validDetId(iX, iY, iZ))
364  id = EcalScDetId(iX, iY, iZ);
365  else
366  continue;
367 
368  EcalSelectiveReadout::towerInterest_t interest = ecalSelectiveReadout->getSuperCrystalInterest(id);
369 
370  if (interest >= 0) { //negative no SC at (iX,iY) coordinates
371  int flag;
372  // if(interest==EcalSelectiveReadout::FORCED_RO){
373  // flag = EcalSrFlag::SRF_FORCED_MASK | EcalSrFlag::SRF_FULL;
374  //} else{
375  flag = srFlags[ENDCAP][interest];
376  //}
377  if (eeSrFlags)
378  eeSrFlags->push_back(EESrFlag(id, flag));
379  } else if (iX < 9 || iX > 12 || iY < 9 || iY > 12) { //not an inner partial SC
380  edm::LogError("EcalSelectiveReadout") << __FILE__ << ":" << __LINE__ << ": "
381  << "negative interest in EE for SC " << id << "\n";
382  }
383  } //next iY
384  } //next iX
385  }
386 }

References accept(), BARREL, mtdUncalibratedRecHits_cfi::barrelDigis, CollectionTags_cfi::EBSrFlag, EcalBarrel, ecalSelectiveReadout, CollectionTags_cfi::EESrFlag, ENDCAP, mtdUncalibratedRecHits_cfi::endcapDigis, 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.

◆ run() [2/2]

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 263 of file EcalSelectiveReadoutSuppressor.cc.

266  {
267  EBDigiCollection selectedBarrelDigis;
268  EEDigiCollection selectedEndcapDigis;
269 
270  run(eventSetup, trigPrims, barrelDigis, endcapDigis, &selectedBarrelDigis, &selectedEndcapDigis, nullptr, nullptr);
271 
272  //replaces the input with the suppressed version
273  barrelDigis.swap(selectedBarrelDigis);
274  endcapDigis.swap(selectedEndcapDigis);
275 }

References mtdUncalibratedRecHits_cfi::barrelDigis, and mtdUncalibratedRecHits_cfi::endcapDigis.

◆ setElecMap()

void EcalSelectiveReadoutSuppressor::setElecMap ( const EcalElectronicsMapping map)

Set the ECAL electronics mapping

Parameters
mapthe ECAL electronics map

Definition at line 101 of file EcalSelectiveReadoutSuppressor.cc.

101  {
102  ecalSelectiveReadout->setElecMap(map);
103 }

References ecalSelectiveReadout, and genParticles_cff::map.

◆ setGeometry()

void EcalSelectiveReadoutSuppressor::setGeometry ( const CaloGeometry caloGeometry)

Sets the geometry of the calorimeters

Definition at line 105 of file EcalSelectiveReadoutSuppressor.cc.

105  {
106 #ifndef ECALSELECTIVEREADOUT_NOGEOM
107  ecalSelectiveReadout->setGeometry(caloGeometry);
108 #endif
109 }

References ecalSelectiveReadout.

◆ setTriggerMap()

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 96 of file EcalSelectiveReadoutSuppressor.cc.

96  {
98  ecalSelectiveReadout->setTriggerMap(map);
99 }

References ecalSelectiveReadout, genParticles_cff::map, and theTriggerMap.

◆ setTtFlags() [1/2]

void EcalSelectiveReadoutSuppressor::setTtFlags ( const EcalTrigPrimDigiCollection trigPrims)
private

Help function to set the srFlags field.

Parameters
trigPrimthe trigger primitive digi collection

Definition at line 388 of file EcalSelectiveReadoutSuppressor.cc.

388  {
389  for (size_t iEta0 = 0; iEta0 < nTriggerTowersInEta; ++iEta0) {
390  for (size_t iPhi0 = 0; iPhi0 < nTriggerTowersInPhi; ++iPhi0) {
391  ttFlags[iEta0][iPhi0] = defaultTtf_;
392  }
393  }
394  for (EcalTrigPrimDigiCollection::const_iterator trigPrim = trigPrims.begin(); trigPrim != trigPrims.end();
395  ++trigPrim) {
396  int iEta = trigPrim->id().ieta();
397  unsigned int iEta0;
398  if (iEta < 0) { //z- half ECAL: transforming ranges -28;-1 => 0;27
399  iEta0 = iEta + nTriggerTowersInEta / 2;
400  } else { //z+ halfECAL: transforming ranges 1;28 => 28;55
401  iEta0 = iEta + nTriggerTowersInEta / 2 - 1;
402  }
403 
404  unsigned int iPhi0 = trigPrim->id().iphi() - 1;
405 
406  if (!ttThresOnCompressedEt_) {
407  ttFlags[iEta0][iPhi0] = (EcalSelectiveReadout::ttFlag_t)trigPrim->ttFlag();
408  } else {
409  int compressedEt = trigPrim->compressedEt();
410  if (compressedEt < trigPrimBypassLTH_) {
412  } else if (compressedEt < trigPrimBypassHTH_) {
414  } else {
416  }
417  }
418  }
419 }

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_.

◆ setTtFlags() [2/2]

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 435 of file EcalSelectiveReadoutSuppressor.cc.

437  {
438  double trigPrim[nTriggerTowersInEta][nTriggerTowersInPhi];
439 
440  //ecal geometry:
441  // static const CaloSubdetectorGeometry* eeGeometry = 0;
442  // static const CaloSubdetectorGeometry* ebGeometry = 0;
443  const CaloSubdetectorGeometry* eeGeometry = nullptr;
444  const CaloSubdetectorGeometry* ebGeometry = nullptr;
445  // if(eeGeometry==0 || ebGeometry==0){
446  edm::ESHandle<CaloGeometry> geoHandle;
447  es.get<CaloGeometryRecord>().get(geoHandle);
448  eeGeometry = (*geoHandle).getSubdetectorGeometry(DetId::Ecal, EcalEndcap);
449  ebGeometry = (*geoHandle).getSubdetectorGeometry(DetId::Ecal, EcalBarrel);
450  // }
451 
452  //init trigPrim array:
453  bzero(trigPrim, sizeof(trigPrim));
454 
455  for (EBDigiCollection::const_iterator it = ebDigis.begin(); it != ebDigis.end(); ++it) {
456  EBDataFrame frame(*it);
458  // edm:::LogDebug("TT") << __FILE__ << ":" << __LINE__ << ": "
459  // << ((EBDetId&)frame.id()).ieta()
460  // << "," << ((EBDetId&)frame.id()).iphi()
461  // << " -> " << ttId.ieta() << "," << ttId.iphi() << "\n";
462  const int iTTEta0 = iTTEta2cIndex(ttId.ieta());
463  const int iTTPhi0 = iTTPhi2cIndex(ttId.iphi());
464  double theta = ebGeometry->getGeometry(frame.id())->getPosition().theta();
465  double e = frame2Energy(frame);
466  if (!trigPrimBypassWithPeakFinder_ || ((frame2Energy(frame, -1) < e) && (frame2Energy(frame, 1) < e))) {
467  trigPrim[iTTEta0][iTTPhi0] += e * sin(theta);
468  }
469  }
470 
471  for (EEDigiCollection::const_iterator it = eeDigis.begin(); it != eeDigis.end(); ++it) {
472  EEDataFrame frame(*it);
474  const int iTTEta0 = iTTEta2cIndex(ttId.ieta());
475  const int iTTPhi0 = iTTPhi2cIndex(ttId.iphi());
476  // cout << __FILE__ << ":" << __LINE__ << ": EE xtal->TT "
477  // << ((EEDetId&)frame.id()).ix()
478  // << "," << ((EEDetId&)frame.id()).iy()
479  // << " -> " << ttId.ieta() << "," << ttId.iphi() << "\n";
480  double theta = eeGeometry->getGeometry(frame.id())->getPosition().theta();
481  double e = frame2Energy(frame);
482  if (!trigPrimBypassWithPeakFinder_ || ((frame2Energy(frame, -1) < e) && (frame2Energy(frame, 1) < e))) {
483  trigPrim[iTTEta0][iTTPhi0] += e * sin(theta);
484  }
485  }
486 
487  //dealing with pseudo-TT in two inner EE eta-ring:
488  int innerTTEtas[] = {0, 1, 54, 55};
489  for (unsigned iRing = 0; iRing < sizeof(innerTTEtas) / sizeof(innerTTEtas[0]); ++iRing) {
490  int iTTEta0 = innerTTEtas[iRing];
491  //this detector eta-section is divided in only 36 phi bins
492  //For this eta regions,
493  //current tower eta numbering scheme is inconsistent. For geometry
494  //version 133:
495  //- TT are numbered from 0 to 72 for 36 bins
496  //- some TT have an even index, some an odd index
497  //For geometry version 125, there are 72 phi bins.
498  //The code below should handle both geometry definition.
499  //If there are 72 input trigger primitives for each inner eta-ring,
500  //then the average of the trigger primitive of the two pseudo-TT of
501  //a pair (nEta, nEta+1) is taken as Et of both pseudo TTs.
502  //If there are only 36 input TTs for each inner eta ring, then half
503  //of the present primitive of a pseudo TT pair is used as Et of both
504  //pseudo TTs.
505 
506  for (unsigned iTTPhi0 = 0; iTTPhi0 < nTriggerTowersInPhi - 1; iTTPhi0 += 2) {
507  double et = .5 * (trigPrim[iTTEta0][iTTPhi0] + trigPrim[iTTEta0][iTTPhi0 + 1]);
508  //divides the TT into 2 phi bins in order to match with 72 phi-bins SRP
509  //scheme or average the Et on the two pseudo TTs if the TT is already
510  //divided into two trigger primitives.
511  trigPrim[iTTEta0][iTTPhi0] = et;
512  trigPrim[iTTEta0][iTTPhi0 + 1] = et;
513  }
514  }
515 
516  for (unsigned iTTEta0 = 0; iTTEta0 < nTriggerTowersInEta; ++iTTEta0) {
517  for (unsigned iTTPhi0 = 0; iTTPhi0 < nTriggerTowersInPhi; ++iTTPhi0) {
518  if (trigPrim[iTTEta0][iTTPhi0] > trigPrimBypassHTH_) {
520  } else if (trigPrim[iTTEta0][iTTPhi0] > trigPrimBypassLTH_) {
522  } else {
524  }
525 
526  // cout /*LogDebug("TT")*/
527  // << "ttFlags[" << iTTEta0 << "][" << iTTPhi0 << "] = "
528  // << ttFlags[iTTEta0][iTTPhi0] << "\n";
529  }
530  }
531 }

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().

Member Data Documentation

◆ actions_

std::vector<int> EcalSelectiveReadoutSuppressor::actions_
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().

◆ defaultTtf_

EcalSelectiveReadout::ttFlag_t EcalSelectiveReadoutSuppressor::defaultTtf_
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().

◆ ecalSelectiveReadout

std::unique_ptr<EcalSelectiveReadout> EcalSelectiveReadoutSuppressor::ecalSelectiveReadout
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().

◆ firstFIRSample

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

◆ firWeights

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

Weights of zero suppression FIR filter

Definition at line 226 of file EcalSelectiveReadoutSuppressor.h.

Referenced by getFIRWeigths().

◆ ievt_

int EcalSelectiveReadoutSuppressor::ievt_
private

Number of produced events

Definition at line 306 of file EcalSelectiveReadoutSuppressor.h.

Referenced by run().

◆ nBarrelTriggerTowersInEta

const static size_t EcalSelectiveReadoutSuppressor::nBarrelTriggerTowersInEta = 34
staticprivate

Number of eta trigger tower divisions in the barrel.

Definition at line 199 of file EcalSelectiveReadoutSuppressor.h.

Referenced by run().

◆ nEndcaps

const static 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 flag ‍/ int thr2Srf(int thr, int zsFlag) const;

/** Number of endcap, obviously two.

Definition at line 191 of file EcalSelectiveReadoutSuppressor.h.

◆ nEndcapTriggerTowersInEta

const static size_t EcalSelectiveReadoutSuppressor::nEndcapTriggerTowersInEta = 11
staticprivate

Number of eta trigger tower divisions in one endcap.

Definition at line 195 of file EcalSelectiveReadoutSuppressor.h.

◆ nFIRTaps

const int EcalSelectiveReadoutSuppressor::nFIRTaps = 6
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().

◆ nTriggerTowersInEta

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

Number of eta divisions in trigger towers for the whole ECAL

Definition at line 203 of file EcalSelectiveReadoutSuppressor.h.

Referenced by setTtFlags().

◆ nTriggerTowersInPhi

const static size_t EcalSelectiveReadoutSuppressor::nTriggerTowersInPhi = 72
staticprivate

Number of phi divisions in trigger towers.

Definition at line 207 of file EcalSelectiveReadoutSuppressor.h.

Referenced by run(), and setTtFlags().

◆ srFlags

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 298 of file EcalSelectiveReadoutSuppressor.h.

Referenced by initCellThresholds(), and run().

◆ symetricZS

bool EcalSelectiveReadoutSuppressor::symetricZS
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().

◆ theTriggerMap

const EcalTrigTowerConstituentsMap* EcalSelectiveReadoutSuppressor::theTriggerMap
private

Definition at line 213 of file EcalSelectiveReadoutSuppressor.h.

Referenced by setTriggerMap(), and setTtFlags().

◆ thrUnit

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 253 of file EcalSelectiveReadoutSuppressor.h.

Referenced by EcalSelectiveReadoutSuppressor(), and internalThreshold().

◆ trigPrimBypass_

bool EcalSelectiveReadoutSuppressor::trigPrimBypass_
private

Switch for trigger primitive simulation module bypass debug mode.

Definition at line 257 of file EcalSelectiveReadoutSuppressor.h.

Referenced by EcalSelectiveReadoutSuppressor(), and run().

◆ trigPrimBypassHTH_

double EcalSelectiveReadoutSuppressor::trigPrimBypassHTH_
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().

◆ trigPrimBypassLTH_

double EcalSelectiveReadoutSuppressor::trigPrimBypassLTH_
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().

◆ trigPrimBypassMode_

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 264 of file EcalSelectiveReadoutSuppressor.h.

Referenced by EcalSelectiveReadoutSuppressor().

◆ trigPrimBypassWithPeakFinder_

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

◆ ttFlags

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

Trigger tower flags: see setTtFlags()

Definition at line 217 of file EcalSelectiveReadoutSuppressor.h.

Referenced by printTTFlags(), run(), and setTtFlags().

◆ ttThresOnCompressedEt_

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 275 of file EcalSelectiveReadoutSuppressor.h.

Referenced by EcalSelectiveReadoutSuppressor(), run(), and setTtFlags().

◆ weights

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

DCC zero suppression FIR filter uncalibrated normalized weigths

Definition at line 235 of file EcalSelectiveReadoutSuppressor.h.

Referenced by EcalSelectiveReadoutSuppressor(), frame2Energy(), and getFIRWeigths().

◆ zsThreshold

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 247 of file EcalSelectiveReadoutSuppressor.h.

Referenced by initCellThresholds(), and run().

EcalSelectiveReadoutSuppressor::nTriggerTowersInPhi
const static size_t nTriggerTowersInPhi
Definition: EcalSelectiveReadoutSuppressor.h:207
EcalSRSettings::srpLowInterestChannelZS_
std::vector< float > srpLowInterestChannelZS_
Definition: EcalSRSettings.h:119
mps_fire.i
i
Definition: mps_fire.py:428
EcalSelectiveReadoutSuppressor::initCellThresholds
void initCellThresholds(double barrelLowInterest, double endcapLowInterest, double barrelHighInterest, double endcapHighInterest)
helpers for constructors
Definition: EcalSelectiveReadoutSuppressor.cc:111
edm::SortedCollection::const_iterator
std::vector< T >::const_iterator const_iterator
Definition: SortedCollection.h:80
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
EcalSelectiveReadoutSuppressor::trigPrimBypassHTH_
double trigPrimBypassHTH_
Definition: EcalSelectiveReadoutSuppressor.h:290
edm::DataFrameContainer::const_iterator
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
Definition: DataFrameContainer.h:61
EcalSelectiveReadoutSuppressor::defaultTtf_
EcalSelectiveReadout::ttFlag_t defaultTtf_
Definition: EcalSelectiveReadoutSuppressor.h:302
simplePhotonAnalyzer_cfi.sample
sample
Definition: simplePhotonAnalyzer_cfi.py:12
HLT_FULL_cff.nEta
nEta
Definition: HLT_FULL_cff.py:6585
mtdUncalibratedRecHits_cfi.barrelDigis
barrelDigis
Definition: mtdUncalibratedRecHits_cfi.py:33
EcalSelectiveReadout::TTF_LOW_INTEREST
Definition: EcalSelectiveReadout.h:83
CalibrationSummaryClient_cfi.params
params
Definition: CalibrationSummaryClient_cfi.py:14
min
T min(T a, T b)
Definition: MathUtil.h:58
CaloGeometryRecord
Definition: CaloGeometryRecord.h:30
EBDetId
Definition: EBDetId.h:17
ecaldqm::ttId
unsigned ttId(DetId const &, EcalElectronicsMapping const *)
Definition: EcalDQMCommonUtils.cc:99
EBDataFrame
Definition: EBDataFrame.h:11
EcalSelectiveReadout::TTF_MID_INTEREST
Definition: EcalSelectiveReadout.h:84
EcalScDetId::validDetId
static bool validDetId(int ix, int iy, int iz)
Definition: EcalScDetId.cc:59
EcalSelectiveReadoutSuppressor::frame2Energy
double frame2Energy(const T &frame, int timeOffset=0) const
Definition: EcalSelectiveReadoutSuppressor.cc:534
EcalSelectiveReadoutSuppressor::BARREL
Definition: EcalSelectiveReadoutSuppressor.h:25
EcalSelectiveReadoutSuppressor::ievt_
int ievt_
Definition: EcalSelectiveReadoutSuppressor.h:306
EcalSelectiveReadout::towerInterest_t
towerInterest_t
Definition: EcalSelectiveReadout.h:69
EcalSRSettings::actions_
std::vector< int > actions_
Definition: EcalSRSettings.h:166
EcalSelectiveReadoutSuppressor::getFIRWeigths
std::vector< int > getFIRWeigths()
Definition: EcalSelectiveReadoutSuppressor.cc:421
EcalTrigTowerDetId
Definition: EcalTrigTowerDetId.h:14
EcalSelectiveReadoutSuppressor::trigPrimBypassWithPeakFinder_
bool trigPrimBypassWithPeakFinder_
Definition: EcalSelectiveReadoutSuppressor.h:280
EcalSelectiveReadoutSuppressor::setTtFlags
void setTtFlags(const edm::EventSetup &eventSetup, const EBDigiCollection &ebDigis, const EEDigiCollection &eeDigis)
Definition: EcalSelectiveReadoutSuppressor.cc:435
EcalSelectiveReadout
Definition: EcalSelectiveReadout.h:62
edm::SortedCollection::push_back
void push_back(T const &t)
Definition: SortedCollection.h:188
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
CollectionTags_cfi.EESrFlag
EESrFlag
Definition: CollectionTags_cfi.py:26
EcalSelectiveReadoutSuppressor::ecalSelectiveReadout
std::unique_ptr< EcalSelectiveReadout > ecalSelectiveReadout
Definition: EcalSelectiveReadoutSuppressor.h:211
EcalSelectiveReadoutSuppressor::trigPrimBypass_
bool trigPrimBypass_
Definition: EcalSelectiveReadoutSuppressor.h:257
EcalSelectiveReadoutSuppressor::ENDCAP
Definition: EcalSelectiveReadoutSuppressor.h:25
EcalBarrel
Definition: EcalSubdetector.h:10
EcalSelectiveReadoutSuppressor::trigPrimBypassMode_
int trigPrimBypassMode_
Definition: EcalSelectiveReadoutSuppressor.h:264
EcalSelectiveReadoutSuppressor::accept
bool accept(const edm::DataFrame &frame, int thr)
Definition: EcalSelectiveReadoutSuppressor.cc:208
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
EcalSelectiveReadoutSuppressor::nTriggerTowersInEta
const static size_t nTriggerTowersInEta
Definition: EcalSelectiveReadoutSuppressor.h:203
EcalSRSettings::deltaEta_
std::vector< int > deltaEta_
Definition: EcalSRSettings.h:56
EEDigiCollection::push_back
void push_back(const Digi &digi)
Definition: EcalDigiCollections.h:77
edm::SortedCollection::begin
const_iterator begin() const
Definition: SortedCollection.h:262
EcalSelectiveReadoutSuppressor::theTriggerMap
const EcalTrigTowerConstituentsMap * theTriggerMap
Definition: EcalSelectiveReadoutSuppressor.h:213
w
const double w
Definition: UKUtility.cc:23
EcalScDetId
Definition: EcalScDetId.h:24
EcalSelectiveReadoutSuppressor::ttFlags
EcalSelectiveReadout::ttFlag_t ttFlags[nTriggerTowersInEta][nTriggerTowersInPhi]
Definition: EcalSelectiveReadoutSuppressor.h:217
edm::ESHandle< CaloGeometry >
EcalSelectiveReadout::FORCED_MASK
static const int FORCED_MASK
Definition: EcalSelectiveReadout.h:64
EcalSelectiveReadoutSuppressor::zsThreshold
int zsThreshold[2][8]
Definition: EcalSelectiveReadoutSuppressor.h:247
theta
Geom::Theta< T > theta() const
Definition: Basic3DVectorLD.h:150
EBDigiCollection::push_back
void push_back(const Digi &digi)
Definition: EcalDigiCollections.h:64
CollectionTags_cfi.EBSrFlag
EBSrFlag
Definition: CollectionTags_cfi.py:25
edm::DataFrameContainer::reserve
void reserve(size_t isize)
Definition: DataFrameContainer.h:86
EEDetId
Definition: EEDetId.h:14
EcalSRSettings::symetricZS_
std::vector< int > symetricZS_
Definition: EcalSRSettings.h:109
EcalEndcap
Definition: EcalSubdetector.h:10
EcalSelectiveReadout::TTF_HIGH_INTEREST
Definition: EcalSelectiveReadout.h:86
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
EcalSelectiveReadout::nTriggerTowersInEta
const static size_t nTriggerTowersInEta
Definition: EcalSelectiveReadout.h:140
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
EcalSelectiveReadoutSuppressor::trigPrimBypassLTH_
double trigPrimBypassLTH_
Definition: EcalSelectiveReadoutSuppressor.h:285
EcalSelectiveReadoutSuppressor::firstFIRSample
int firstFIRSample
Definition: EcalSelectiveReadoutSuppressor.h:222
EBDigiCollection
Definition: EcalDigiCollections.h:56
edm::SortedCollection::end
const_iterator end() const
Definition: SortedCollection.h:267
EEDigiCollection
Definition: EcalDigiCollections.h:69
HLT_FULL_cff.nPhi
nPhi
Definition: HLT_FULL_cff.py:6586
iEvent
int iEvent
Definition: GenABIO.cc:224
edm::DataFrameContainer::begin
const_iterator begin() const
The iterator returned can not safely be used across threads.
Definition: DataFrameContainer.h:149
EcalSelectiveReadoutSuppressor::firWeights
std::vector< int > firWeights
Definition: EcalSelectiveReadoutSuppressor.h:226
EcalSelectiveReadoutSuppressor::iTTEta2cIndex
int iTTEta2cIndex(int iEta) const
Definition: EcalSelectiveReadoutSuppressor.h:156
EgHLTOffHistBins_cfi.et
et
Definition: EgHLTOffHistBins_cfi.py:8
CaloSubdetectorGeometry::getGeometry
virtual std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
Definition: CaloSubdetectorGeometry.cc:36
EcalSRSettings::deltaPhi_
std::vector< int > deltaPhi_
Definition: EcalSRSettings.h:69
EcalSelectiveReadoutSuppressor::nBarrelTriggerTowersInEta
const static size_t nBarrelTriggerTowersInEta
Definition: EcalSelectiveReadoutSuppressor.h:199
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
DetId::Ecal
Definition: DetId.h:27
EcalSelectiveReadoutSuppressor::iTTPhi2cIndex
int iTTPhi2cIndex(int iPhi) const
Definition: EcalSelectiveReadoutSuppressor.h:163
get
#define get
EcalSRSettings::ebDccAdcToGeV_
float ebDccAdcToGeV_
ADC to GeV conversion factor used in ZS filter for EB.
Definition: EcalSRSettings.h:81
EcalSelectiveReadoutSuppressor::srFlags
int srFlags[2][8]
Definition: EcalSelectiveReadoutSuppressor.h:298
EcalMGPASample
Definition: EcalMGPASample.h:22
EcalTrigTowerConstituentsMap::towerOf
EcalTrigTowerDetId towerOf(const DetId &id) const
Get the tower id for this det id (or null if not known)
Definition: EcalTrigTowerConstituentsMap.cc:11
EcalSelectiveReadoutSuppressor::ttThresOnCompressedEt_
bool ttThresOnCompressedEt_
Definition: EcalSelectiveReadoutSuppressor.h:275
EcalSRSettings::dccNormalizedWeights_
std::vector< std::vector< float > > dccNormalizedWeights_
Definition: EcalSRSettings.h:97
EcalSelectiveReadoutSuppressor::nFIRTaps
static const int nFIRTaps
Definition: EcalSelectiveReadoutSuppressor.h:231
EcalSelectiveReadoutSuppressor::thrUnit
double thrUnit[2]
Definition: EcalSelectiveReadoutSuppressor.h:253
tccFlagMarker
const char tccFlagMarker[]
Definition: GenABIO.cc:164
EcalSRSettings::ecalDccZs1stSample_
std::vector< int > ecalDccZs1stSample_
Definition: EcalSRSettings.h:78
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29
edm::SortedCollection::reserve
void reserve(size_type n)
Definition: SortedCollection.h:225
EcalSRSettings::eeDccAdcToGeV_
float eeDccAdcToGeV_
ADC to GeV conversion factor used in ZS filter for EE.
Definition: EcalSRSettings.h:83
amptDefault_cfi.frame
frame
Definition: amptDefault_cfi.py:12
Exception
Definition: hltDiff.cc:245
EcalSelectiveReadoutSuppressor::weights
std::vector< float > weights
Definition: EcalSelectiveReadoutSuppressor.h:235
EcalSelectiveReadoutSuppressor::run
void run(const edm::EventSetup &eventSetup, const EcalTrigPrimDigiCollection &trigPrims, EBDigiCollection &barrelDigis, EEDigiCollection &endcapDigis)
Definition: EcalSelectiveReadoutSuppressor.cc:263
CaloSubdetectorGeometry
Definition: CaloSubdetectorGeometry.h:22
EcalSelectiveReadout::ttFlag_t
ttFlag_t
Definition: EcalSelectiveReadout.h:81
EcalSRSettings::srpHighInterestChannelZS_
std::vector< float > srpHighInterestChannelZS_
Definition: EcalSRSettings.h:129
L1TowerCalibrationProducer_cfi.iEta
iEta
Definition: L1TowerCalibrationProducer_cfi.py:60
EcalSelectiveReadoutSuppressor::actions_
std::vector< int > actions_
Definition: EcalSelectiveReadoutSuppressor.h:269
mps_fire.result
result
Definition: mps_fire.py:311
EcalSelectiveReadoutSuppressor::internalThreshold
int internalThreshold(double thresholdInGeV, int iSubDet) const
Definition: EcalSelectiveReadoutSuppressor.cc:188
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
genParticles_cff.map
map
Definition: genParticles_cff.py:11
mtdUncalibratedRecHits_cfi.endcapDigis
endcapDigis
Definition: mtdUncalibratedRecHits_cfi.py:34
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:82
EEDataFrame
Definition: EEDataFrame.h:12
EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0.cerr
cerr
Definition: EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0.py:8
SimL1EmulatorDM_cff.eeDigis
eeDigis
Definition: SimL1EmulatorDM_cff.py:18
EcalSelectiveReadout::nTriggerTowersInPhi
const static size_t nTriggerTowersInPhi
Definition: EcalSelectiveReadout.h:143
edm::DataFrameContainer::end
const_iterator end() const
Definition: DataFrameContainer.h:152
EcalSelectiveReadoutSuppressor::symetricZS
bool symetricZS
Definition: EcalSelectiveReadoutSuppressor.h:239
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:117
edm::DataFrameContainer::size
size_type size() const
Definition: DataFrameContainer.h:162
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37