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, 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::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

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

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.

References EcalSRSettings::actions_, actions_, BARREL, EcalSRSettings::dccNormalizedWeights_, defaultTtf_, EcalSRSettings::deltaEta_, EcalSRSettings::deltaPhi_, EcalSRSettings::ebDccAdcToGeV_, EcalSRSettings::ecalDccZs1stSample_, ecalSelectiveReadout, EcalSRSettings::eeDccAdcToGeV_, ENDCAP, Exception, firstFIRSample, edm::ParameterSet::getParameter(), mps_fire::i, initCellThresholds(), EcalSRSettings::srpHighInterestChannelZS_, EcalSRSettings::srpLowInterestChannelZS_, symetricZS, EcalSRSettings::symetricZS_, thrUnit, trigPrimBypass_, trigPrimBypassHTH_, trigPrimBypassLTH_, trigPrimBypassMode_, trigPrimBypassWithPeakFinder_, ttThresOnCompressedEt_, and weights.

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

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.

References EcalMGPASample::adc(), firstFIRSample, EcalMGPASample::gainId(), getFIRWeigths(), nFIRTaps, mps_fire::result, simplePhotonAnalyzer_cfi::sample, edm::DataFrame::size(), symetricZS, and w.

Referenced by Vispa.Gui.BoxContentDialog.BoxContentDialog::apply(), Vispa.Plugins.ConfigEditor.ToolDialog.ToolDialog::apply(), getEcalSelectiveReadout(), esMonitoring.FDJsonServer::handle_accept(), and run().

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

Definition at line 559 of file EcalSelectiveReadoutSuppressor.cc.

References MessageLogger_cfi::cerr, mps_fire::i, gen::n, PFRecoTauDiscriminationByIsolation_cfi::offset, and weights.

Referenced by iTTPhi2cIndex(), and setTtFlags().

560  {
561  //we have to start by 0 in order to handle offset=-1
562  //(however Fenix FIR has AFAK only 5 taps)
563  double weights[] = {0., -1/3., -1/3., -1/3., 0., 1.};
564 
565  double adc2GeV = 0.;
566  if(typeid(frame) == typeid(EBDataFrame)){
567  adc2GeV = 0.035;
568  } else if(typeid(frame) == typeid(EEDataFrame)){
569  adc2GeV = 0.060;
570  } else{ //T is an invalid type!
571  //TODO: replace message by a cms exception
572  cerr << "Severe error. "
573  << __FILE__ << ":" << __LINE__ << ": "
574  << "this is a bug. Please report it.\n";
575  }
576 
577  double acc = 0;
578 
579  const int n = min<int>(frame.size(), sizeof(weights)/sizeof(weights[0]));
580 
581  double gainInv[] = {12., 1., 6., 12.};
582 
583 
584  //cout << __PRETTY_FUNCTION__ << ": ";
585  for(int i=offset; i < n; ++i){
586  int iframe = i + offset;
587  if(iframe>=0 && iframe<frame.size()){
588  acc += weights[i]*frame[iframe].adc()
589  *gainInv[frame[iframe].gainId()]*adc2GeV;
590  //cout << (iframe>offset?"+":"")
591  // << frame[iframe].adc() << "*" << gainInv[frame[iframe].gainId()]
592  // << "*" << adc2GeV << "*(" << weights[i] << ")";
593  }
594  }
595  //cout << "\n";
596  return acc;
597 }
EcalSelectiveReadout* EcalSelectiveReadoutSuppressor::getEcalSelectiveReadout ( )
inline

For debugging purposes.

Definition at line 84 of file EcalSelectiveReadoutSuppressor.h.

References accept(), ecalSelectiveReadout, getFIRWeigths(), iEvent, initCellThresholds(), internalThreshold(), and printTTFlags().

84  {
85  return ecalSelectiveReadout.get();
86  }
std::unique_ptr< EcalSelectiveReadout > ecalSelectiveReadout
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.

References ftlUncalibratedRecHits_cfi::barrelDigis, ftlUncalibratedRecHits_cfi::endcapDigis, genParticles_cff::map, nFIRTaps, run(), setElecMap(), setGeometry(), and setTriggerMap().

Referenced by EcalSelectiveReadoutProducer::checkWeights().

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.

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

Referenced by accept(), and getEcalSelectiveReadout().

437  {
438  if(firWeights.empty()){
439  firWeights = vector<int>(nFIRTaps, 0); //default weight: 0;
440  const static int maxWeight = 0xEFF; //weights coded on 11+1 signed bits
441  for(unsigned i=0; i < min((size_t)nFIRTaps,weights.size()); ++i){
442  firWeights[i] = lround(weights[i] * (1<<10));
443  if(abs(firWeights[i])>maxWeight){//overflow
444  firWeights[i] = firWeights[i]<0?-maxWeight:maxWeight;
445  }
446  }
447  }
448  return firWeights;
449 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
T min(T a, T b)
Definition: MathUtil.h:58
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.

145  {
146  return (iEta<0)?iEta+85:iEta+84;
147  }
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.

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

Referenced by EcalSelectiveReadoutSuppressor(), and getEcalSelectiveReadout().

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

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

Referenced by getEcalSelectiveReadout(), and initCellThresholds().

195  {
196  double thr_ = thresholdInGeV / thrUnit[iSubDet];
197  //treating over- and underflows, threshold is coded on 11+1 signed bits
198  //an underflow threshold is considered here as if NoRO DCC switch is on
199  //an overflow threshold is considered here as if ForcedRO DCC switch in on
200  //Beware that conparison must be done on a double type, because conversion
201  //cast to an int of a double higher than MAX_INT is undefined.
202  int thr;
203  if(thr_>=0x7FF+.5){
204  thr = numeric_limits<int>::max();
205  } else if(thr_<=-0x7FF-.5){
206  thr = numeric_limits<int>::min();
207  } else{
208  thr = lround(thr_);
209  }
210  return thr;
211 }
T min(T a, T b)
Definition: MathUtil.h:58
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.

154  {
155  return iPhi-1;
156  }
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.

Referenced by setTtFlags().

163  {
164  return (iEta<0)?iEta+28:iEta+27;
165  }
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.

References frame2Energy(), setTtFlags(), and hgcalLayerClusters_cff::timeOffset.

Referenced by setTtFlags().

172  {
173  return iPhi-1;
174  }
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.

References DetIdAssociatorESProducer_cff::nEta, DetIdAssociatorESProducer_cff::nPhi, EcalSelectiveReadout::nTriggerTowersInEta, EcalSelectiveReadout::nTriggerTowersInPhi, tccFlagMarker, and ttFlags.

Referenced by getEcalSelectiveReadout().

600  {
601  const char tccFlagMarker[] = { '?', '.', 'S', '?', 'C', 'E', 'E', 'E', 'E'};
604 
605  if(withHeader){
606  os << "# TCC flag map\n#\n"
607  "# +-->Phi " << tccFlagMarker[1+0] << ": 000 (low interest)\n"
608  "# | " << tccFlagMarker[1+1] << ": 001 (mid interest)\n"
609  "# | " << tccFlagMarker[1+2] << ": 010 (not valid)\n"
610  "# V Eta " << tccFlagMarker[1+3] << ": 011 (high interest)\n"
611  "# " << tccFlagMarker[1+4] << ": 1xx forced readout (Hw error)\n";
612  }
613 
614  if(iEvent>=0){
615  os << "#\n#Event " << iEvent << "\n";
616  }
617 
618  for(int iEta=0; iEta<nEta; ++iEta){
619  for(int iPhi=0; iPhi<nPhi; ++iPhi){
620  os << tccFlagMarker[ttFlags[iEta][iPhi]+1];
621  }
622  os << "\n";
623  }
624 }
const char tccFlagMarker[]
Definition: GenABIO.cc:176
EcalSelectiveReadout::ttFlag_t ttFlags[nTriggerTowersInEta][nTriggerTowersInPhi]
int iEvent
Definition: GenABIO.cc:230
static const size_t nTriggerTowersInEta
static const size_t nTriggerTowersInPhi
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.

References EBDigiCollection::swap(), and EEDigiCollection::swap().

Referenced by getFIRTapCount().

273  {
274  EBDigiCollection selectedBarrelDigis;
275  EEDigiCollection selectedEndcapDigis;
276 
277  run(eventSetup, trigPrims, barrelDigis, endcapDigis,
278  &selectedBarrelDigis, &selectedEndcapDigis, nullptr, nullptr);
279 
280 //replaces the input with the suppressed version
281  barrelDigis.swap(selectedBarrelDigis);
282  endcapDigis.swap(selectedEndcapDigis);
283 }
void swap(EBDigiCollection &other)
void run(const edm::EventSetup &eventSetup, const EcalTrigPrimDigiCollection &trigPrims, EBDigiCollection &barrelDigis, EEDigiCollection &endcapDigis)
void swap(EEDigiCollection &other)
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.

References accept(), BARREL, edm::DataFrameContainer::begin(), EcalBarrel, ecalSelectiveReadout, edm::DataFrameContainer::end(), ENDCAP, Exception, RemoveAddSevLevel::flag, triggerObjects_cff::id, 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.

294  {
295  ++ievt_;
296  if(!trigPrimBypass_ || ttThresOnCompressedEt_){//uses output of TPG emulator
297  setTtFlags(trigPrims);
298  } else{//debug mode, run w/o TP digis
299  setTtFlags(eventSetup, barrelDigis, endcapDigis);
300  }
301 
302  ecalSelectiveReadout->runSelectiveReadout0(ttFlags);
303 
304  if(selectedBarrelDigis){
305  selectedBarrelDigis->reserve(barrelDigis.size()/20);
306 
307  // do barrel first
308  for(EBDigiCollection::const_iterator digiItr = barrelDigis.begin();
309  digiItr != barrelDigis.end(); ++digiItr){
310  int interestLevel
311  = ecalSelectiveReadout->getCrystalInterest(EBDigiCollection::DetId(digiItr->id())) && ~EcalSelectiveReadout::FORCED_MASK;
312  if(accept(*digiItr, zsThreshold[BARREL][interestLevel])){
313  selectedBarrelDigis->push_back(digiItr->id(), digiItr->begin());
314  }
315  }
316  }
317 
318  // and endcaps
319  if(selectedEndcapDigis){
320  selectedEndcapDigis->reserve(endcapDigis.size()/20);
321  for(EEDigiCollection::const_iterator digiItr = endcapDigis.begin();
322  digiItr != endcapDigis.end(); ++digiItr){
323  int interestLevel
324  = ecalSelectiveReadout->getCrystalInterest(EEDigiCollection::DetId(digiItr->id()))
325  & ~EcalSelectiveReadout::FORCED_MASK;
326  if(accept(*digiItr, zsThreshold[ENDCAP][interestLevel])){
327  selectedEndcapDigis->push_back(digiItr->id(), digiItr->begin());
328  }
329  }
330  }
331 
332  if(ievt_ <= 10){
333  int neb = (selectedBarrelDigis?selectedBarrelDigis->size():0);
334  if(selectedEndcapDigis) LogDebug("EcalSelectiveReadout")
335  // << __FILE__ << ":" << __LINE__ << ": "
336  << "Number of EB digis passing the SR: " << neb
337  << " / " << barrelDigis.size() << "\n";
338  if(selectedEndcapDigis) LogDebug("EcalSelectiveReadout")
339  // << __FILE__ << ":" << __LINE__ << ": "
340  << "\nNumber of EE digis passing the SR: "
341  << selectedEndcapDigis->size()
342  << " / " << endcapDigis.size() << "\n";
343  }
344 
345  if(ebSrFlags) ebSrFlags->reserve(34*72);
346  if(eeSrFlags) eeSrFlags->reserve(624);
347  //SR flags:
348  for(int iZ = -1; iZ <=1; iZ+=2){ //-1=>EE-, EB-, +1=>EE+, EB+
349  //barrel:
350  for(unsigned iEta = 1; iEta <= nBarrelTriggerTowersInEta/2; ++iEta){
351  for(unsigned iPhi = 1; iPhi <= nTriggerTowersInPhi; ++iPhi){
352  const EcalTrigTowerDetId id(iZ, EcalBarrel, iEta, iPhi);
354  = ecalSelectiveReadout->getTowerInterest(id);
355  if(interest<0){
356  throw cms::Exception("EcalSelectiveReadout")
357  << __FILE__ << ":" << __LINE__ << ": " << "unknown SR flag. for "
358  << " TT " << id << ". Most probably a bug.";
359  }
360  int flag;
361  // if(interest==EcalSelectiveReadout::FORCED_RO){
362  // flag = EcalSrFlag::SRF_FORCED_MASK | EcalSrFlag::SRF_FULL;
363  //} else{
364  flag = srFlags[BARREL][interest];
365  //}
366  if(ebSrFlags) ebSrFlags->push_back(EBSrFlag(id, flag));
367  }//next iPhi
368  } //next barrel iEta
369 
370  //endcap:
371  EcalScDetId id;
372  for(int iX = 1; iX <= 20; ++iX){
373  for(int iY = 1; iY <= 20; ++iY){
374 
375  if (EcalScDetId::validDetId(iX, iY, iZ))
376  id = EcalScDetId(iX, iY, iZ);
377  else
378  continue;
379 
381  = ecalSelectiveReadout->getSuperCrystalInterest(id);
382 
383  if(interest>=0){//negative no SC at (iX,iY) coordinates
384  int flag;
385  // if(interest==EcalSelectiveReadout::FORCED_RO){
386  // flag = EcalSrFlag::SRF_FORCED_MASK | EcalSrFlag::SRF_FULL;
387  //} else{
388  flag = srFlags[ENDCAP][interest];
389  //}
390  if(eeSrFlags) eeSrFlags->push_back(EESrFlag(id, flag));
391  } else if(iX < 9 || iX > 12 || iY < 9 || iY >12){ //not an inner partial SC
392  edm::LogError("EcalSelectiveReadout") << __FILE__ << ":" << __LINE__ << ": "
393  << "negative interest in EE for SC "
394  << id << "\n";
395  }
396  } //next iY
397  } //next iX
398  }
399 }
#define LogDebug(id)
void push_back(const Digi &digi)
static bool validDetId(int ix, int iy, int iz)
Definition: EcalScDetId.cc:64
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
void push_back(T const &t)
const_iterator begin() const
std::unique_ptr< EcalSelectiveReadout > ecalSelectiveReadout
EcalSelectiveReadout::ttFlag_t ttFlags[nTriggerTowersInEta][nTriggerTowersInPhi]
void reserve(size_t isize)
const_iterator end() const
bool accept(const edm::DataFrame &frame, int thr)
void push_back(const Digi &digi)
void setTtFlags(const edm::EventSetup &eventSetup, const EBDigiCollection &ebDigis, const EEDigiCollection &eeDigis)
void reserve(size_type n)
void EcalSelectiveReadoutSuppressor::setElecMap ( const EcalElectronicsMapping map)

Set the ECAL electronics mapping

Parameters
mapthe ECAL electronics map

Definition at line 108 of file EcalSelectiveReadoutSuppressor.cc.

References ecalSelectiveReadout.

Referenced by getFIRTapCount().

108  {
109  ecalSelectiveReadout->setElecMap(map);
110 }
std::unique_ptr< EcalSelectiveReadout > ecalSelectiveReadout
void EcalSelectiveReadoutSuppressor::setGeometry ( const CaloGeometry caloGeometry)

Sets the geometry of the calorimeters

Definition at line 113 of file EcalSelectiveReadoutSuppressor.cc.

References ecalSelectiveReadout.

Referenced by getFIRTapCount().

114 {
115 #ifndef ECALSELECTIVEREADOUT_NOGEOM
116  ecalSelectiveReadout->setGeometry(caloGeometry);
117 #endif
118 }
std::unique_ptr< EcalSelectiveReadout > ecalSelectiveReadout
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.

References ecalSelectiveReadout, genParticles_cff::map, and theTriggerMap.

Referenced by getFIRTapCount().

103  {
104  theTriggerMap = map;
105  ecalSelectiveReadout->setTriggerMap(map);
106 }
std::unique_ptr< EcalSelectiveReadout > ecalSelectiveReadout
const EcalTrigTowerConstituentsMap * theTriggerMap
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.

References edm::DataFrameContainer::begin(), MillePedeFileConverter_cfg::e, DetId::Ecal, EcalBarrel, EcalEndcap, edm::DataFrameContainer::end(), stringResolutionProvider_cfi::et, frame2Energy(), edm::EventSetup::get(), CaloSubdetectorGeometry::getGeometry(), EEDataFrame::id(), EBDataFrame::id(), EcalTrigTowerDetId::ieta(), EcalTrigTowerDetId::iphi(), iTTEta2cIndex(), iTTPhi2cIndex(), nTriggerTowersInEta, nTriggerTowersInPhi, funct::sin(), theta(), theTriggerMap, EcalTrigTowerConstituentsMap::towerOf(), trigPrimBypassHTH_, trigPrimBypassLTH_, trigPrimBypassWithPeakFinder_, EcalSelectiveReadout::TTF_HIGH_INTEREST, EcalSelectiveReadout::TTF_LOW_INTEREST, EcalSelectiveReadout::TTF_MID_INTEREST, ttFlags, and ecaldqm::ttId().

Referenced by iTTPhi2cIndex(), and run().

454  {
455  double trigPrim[nTriggerTowersInEta][nTriggerTowersInPhi];
456 
457  //ecal geometry:
458 // static const CaloSubdetectorGeometry* eeGeometry = 0;
459 // static const CaloSubdetectorGeometry* ebGeometry = 0;
460  const CaloSubdetectorGeometry* eeGeometry = nullptr;
461  const CaloSubdetectorGeometry* ebGeometry = nullptr;
462 // if(eeGeometry==0 || ebGeometry==0){
463  edm::ESHandle<CaloGeometry> geoHandle;
464  es.get<CaloGeometryRecord>().get(geoHandle);
465  eeGeometry
466  = (*geoHandle).getSubdetectorGeometry(DetId::Ecal, EcalEndcap);
467  ebGeometry
468  = (*geoHandle).getSubdetectorGeometry(DetId::Ecal, EcalBarrel);
469 // }
470 
471  //init trigPrim array:
472  bzero(trigPrim, sizeof(trigPrim));
473 
474  for(EBDigiCollection::const_iterator it = ebDigis.begin();
475  it != ebDigis.end(); ++it){
476  EBDataFrame frame(*it);
477  const EcalTrigTowerDetId& ttId = theTriggerMap->towerOf(frame.id());
478 // edm:::LogDebug("TT") << __FILE__ << ":" << __LINE__ << ": "
479 // << ((EBDetId&)frame.id()).ieta()
480 // << "," << ((EBDetId&)frame.id()).iphi()
481 // << " -> " << ttId.ieta() << "," << ttId.iphi() << "\n";
482  const int iTTEta0 = iTTEta2cIndex(ttId.ieta());
483  const int iTTPhi0 = iTTPhi2cIndex(ttId.iphi());
484  double theta = ebGeometry->getGeometry(frame.id())->getPosition().theta();
485  double e = frame2Energy(frame);
487  || ((frame2Energy(frame,-1) < e) && (frame2Energy(frame, 1) < e))){
488  trigPrim[iTTEta0][iTTPhi0] += e*sin(theta);
489  }
490  }
491 
492  for(EEDigiCollection::const_iterator it = eeDigis.begin();
493  it != eeDigis.end(); ++it){
494  EEDataFrame frame(*it);
495  const EcalTrigTowerDetId& ttId = theTriggerMap->towerOf(frame.id());
496  const int iTTEta0 = iTTEta2cIndex(ttId.ieta());
497  const int iTTPhi0 = iTTPhi2cIndex(ttId.iphi());
498 // cout << __FILE__ << ":" << __LINE__ << ": EE xtal->TT "
499 // << ((EEDetId&)frame.id()).ix()
500 // << "," << ((EEDetId&)frame.id()).iy()
501 // << " -> " << ttId.ieta() << "," << ttId.iphi() << "\n";
502  double theta = eeGeometry->getGeometry(frame.id())->getPosition().theta();
503  double e = frame2Energy(frame);
505  || ((frame2Energy(frame,-1) < e) && (frame2Energy(frame, 1) < e))){
506  trigPrim[iTTEta0][iTTPhi0] += e*sin(theta);
507  }
508  }
509 
510  //dealing with pseudo-TT in two inner EE eta-ring:
511  int innerTTEtas[] = {0, 1, 54, 55};
512  for(unsigned iRing = 0; iRing < sizeof(innerTTEtas)/sizeof(innerTTEtas[0]);
513  ++iRing){
514  int iTTEta0 = innerTTEtas[iRing];
515  //this detector eta-section is divided in only 36 phi bins
516  //For this eta regions,
517  //current tower eta numbering scheme is inconsistent. For geometry
518  //version 133:
519  //- TT are numbered from 0 to 72 for 36 bins
520  //- some TT have an even index, some an odd index
521  //For geometry version 125, there are 72 phi bins.
522  //The code below should handle both geometry definition.
523  //If there are 72 input trigger primitives for each inner eta-ring,
524  //then the average of the trigger primitive of the two pseudo-TT of
525  //a pair (nEta, nEta+1) is taken as Et of both pseudo TTs.
526  //If there are only 36 input TTs for each inner eta ring, then half
527  //of the present primitive of a pseudo TT pair is used as Et of both
528  //pseudo TTs.
529 
530  for(unsigned iTTPhi0 = 0; iTTPhi0 < nTriggerTowersInPhi-1; iTTPhi0 += 2){
531  double et = .5*(trigPrim[iTTEta0][iTTPhi0]
532  +trigPrim[iTTEta0][iTTPhi0+1]);
533  //divides the TT into 2 phi bins in order to match with 72 phi-bins SRP
534  //scheme or average the Et on the two pseudo TTs if the TT is already
535  //divided into two trigger primitives.
536  trigPrim[iTTEta0][iTTPhi0] = et;
537  trigPrim[iTTEta0][iTTPhi0+1] = et;
538  }
539  }
540 
541  for(unsigned iTTEta0 = 0; iTTEta0 < nTriggerTowersInEta; ++iTTEta0){
542  for(unsigned iTTPhi0 = 0; iTTPhi0 < nTriggerTowersInPhi; ++iTTPhi0){
543  if(trigPrim[iTTEta0][iTTPhi0] > trigPrimBypassHTH_){
545  } else if(trigPrim[iTTEta0][iTTPhi0] > trigPrimBypassLTH_){
547  } else{
549  }
550 
551  // cout /*LogDebug("TT")*/
552  // << "ttFlags[" << iTTEta0 << "][" << iTTPhi0 << "] = "
553  // << ttFlags[iTTEta0][iTTPhi0] << "\n";
554  }
555  }
556 }
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
double frame2Energy(const T &frame, int timeOffset=0) const
Geom::Theta< T > theta() const
const_iterator begin() const
unsigned ttId(DetId const &)
EcalTrigTowerDetId towerOf(const DetId &id) const
Get the tower id for this det id (or null if not known)
int ieta() const
get the tower ieta
EcalSelectiveReadout::ttFlag_t ttFlags[nTriggerTowersInEta][nTriggerTowersInPhi]
int iphi() const
get the tower iphi
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.
et
define resolution functions of each parameter
const_iterator end() const
const EcalTrigTowerConstituentsMap * theTriggerMap
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.

References edm::SortedCollection< T, SORT >::begin(), defaultTtf_, edm::SortedCollection< T, SORT >::end(), nTriggerTowersInEta, nTriggerTowersInPhi, trigPrimBypassHTH_, trigPrimBypassLTH_, EcalSelectiveReadout::TTF_HIGH_INTEREST, EcalSelectiveReadout::TTF_LOW_INTEREST, EcalSelectiveReadout::TTF_MID_INTEREST, ttFlags, and ttThresOnCompressedEt_.

402  {
403  for(size_t iEta0 = 0; iEta0 < nTriggerTowersInEta; ++iEta0){
404  for(size_t iPhi0 = 0; iPhi0 < nTriggerTowersInPhi; ++iPhi0){
405  ttFlags[iEta0][iPhi0] = defaultTtf_;
406  }
407  }
408  for(EcalTrigPrimDigiCollection::const_iterator trigPrim = trigPrims.begin();
409  trigPrim != trigPrims.end(); ++trigPrim){
410  int iEta = trigPrim->id().ieta();
411  unsigned int iEta0;
412  if(iEta<0){ //z- half ECAL: transforming ranges -28;-1 => 0;27
413  iEta0 = iEta + nTriggerTowersInEta/2;
414  } else{ //z+ halfECAL: transforming ranges 1;28 => 28;55
415  iEta0 = iEta + nTriggerTowersInEta/2 - 1;
416  }
417 
418  unsigned int iPhi0 = trigPrim->id().iphi() - 1;
419 
421  ttFlags[iEta0][iPhi0] =
422  (EcalSelectiveReadout::ttFlag_t) trigPrim->ttFlag();
423  } else{
424  int compressedEt = trigPrim->compressedEt();
425  if(compressedEt < trigPrimBypassLTH_){
427  } else if(compressedEt < trigPrimBypassHTH_){
429  } else{
431  }
432  }
433  }
434 }
std::vector< EcalTriggerPrimitiveDigi >::const_iterator const_iterator
EcalSelectiveReadout::ttFlag_t ttFlags[nTriggerTowersInEta][nTriggerTowersInPhi]
EcalSelectiveReadout::ttFlag_t defaultTtf_
const_iterator end() const
const_iterator begin() const

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.

Referenced by EcalSelectiveReadoutSuppressor(), and initCellThresholds().

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.

Referenced by EcalSelectiveReadoutSuppressor(), and setTtFlags().

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

Help class to comput selective readout flags.

Definition at line 227 of file EcalSelectiveReadoutSuppressor.h.

Referenced by EcalSelectiveReadoutSuppressor(), getEcalSelectiveReadout(), run(), setElecMap(), setGeometry(), and setTriggerMap().

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.

Referenced by accept(), and EcalSelectiveReadoutSuppressor().

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

Weights of zero suppression FIR filter

Definition at line 242 of file EcalSelectiveReadoutSuppressor.h.

Referenced by getFIRWeigths().

int EcalSelectiveReadoutSuppressor::ievt_
private

Number of produced events

Definition at line 323 of file EcalSelectiveReadoutSuppressor.h.

Referenced by run().

const size_t EcalSelectiveReadoutSuppressor::nBarrelTriggerTowersInEta = 34
staticprivate

Number of eta trigger tower divisions in the barrel.

Definition at line 213 of file EcalSelectiveReadoutSuppressor.h.

Referenced by run().

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.

Referenced by accept(), getFIRTapCount(), and getFIRWeigths().

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.

Referenced by setTtFlags().

const size_t EcalSelectiveReadoutSuppressor::nTriggerTowersInPhi = 72
staticprivate

Number of phi divisions in trigger towers.

Definition at line 222 of file EcalSelectiveReadoutSuppressor.h.

Referenced by run(), and setTtFlags().

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.

Referenced by initCellThresholds(), and run().

bool EcalSelectiveReadoutSuppressor::symetricZS
private

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

Definition at line 255 of file EcalSelectiveReadoutSuppressor.h.

Referenced by accept(), and EcalSelectiveReadoutSuppressor().

const EcalTrigTowerConstituentsMap* EcalSelectiveReadoutSuppressor::theTriggerMap
private

Definition at line 229 of file EcalSelectiveReadoutSuppressor.h.

Referenced by setTriggerMap(), and setTtFlags().

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.

Referenced by EcalSelectiveReadoutSuppressor(), and internalThreshold().

bool EcalSelectiveReadoutSuppressor::trigPrimBypass_
private

Switch for trigger primitive simulation module bypass debug mode.

Definition at line 273 of file EcalSelectiveReadoutSuppressor.h.

Referenced by EcalSelectiveReadoutSuppressor(), and run().

double EcalSelectiveReadoutSuppressor::trigPrimBypassHTH_
private

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

Definition at line 306 of file EcalSelectiveReadoutSuppressor.h.

Referenced by EcalSelectiveReadoutSuppressor(), and setTtFlags().

double EcalSelectiveReadoutSuppressor::trigPrimBypassLTH_
private

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

Definition at line 301 of file EcalSelectiveReadoutSuppressor.h.

Referenced by EcalSelectiveReadoutSuppressor(), and setTtFlags().

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.

Referenced by EcalSelectiveReadoutSuppressor().

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.

Referenced by EcalSelectiveReadoutSuppressor(), and setTtFlags().

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

Trigger tower flags: see setTtFlags()

Definition at line 233 of file EcalSelectiveReadoutSuppressor.h.

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

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.

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

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

DCC zero suppression FIR filter uncalibrated normalized weigths

Definition at line 251 of file EcalSelectiveReadoutSuppressor.h.

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

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.

Referenced by initCellThresholds(), and run().