CMS 3D CMS Logo

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

#include <EcalSelectiveReadoutSuppressor.h>

Public Types

enum  { BARREL, ENDCAP }
 

Public Member Functions

 EcalSelectiveReadoutSuppressor (const edm::ParameterSet &params, const EcalSRSettings *settings)
 
EcalSelectiveReadoutgetEcalSelectiveReadout ()
 
void printTTFlags (std::ostream &os, int iEvent=-1, bool withHeader=true) const
 
void run (const edm::EventSetup &eventSetup, const EcalTrigPrimDigiCollection &trigPrims, EBDigiCollection &barrelDigis, EEDigiCollection &endcapDigis)
 
void run (const edm::EventSetup &eventSetup, const EcalTrigPrimDigiCollection &trigPrims, const EBDigiCollection &barrelDigis, const EEDigiCollection &endcapDigis, EBDigiCollection *selectedBarrelDigis, EEDigiCollection *selectedEndcapDigis, EBSrFlagCollection *ebSrFlags, EESrFlagCollection *eeSrFlags)
 
void setElecMap (const EcalElectronicsMapping *map)
 
void setGeometry (const CaloGeometry *caloGeometry)
 
void setTriggerMap (const EcalTrigTowerConstituentsMap *map)
 

Static Public Member Functions

static int getFIRTapCount ()
 

Private Member Functions

bool accept (const edm::DataFrame &frame, int thr)
 
template<class T >
double frame2Energy (const T &frame, int timeOffset=0) const
 
std::vector< int > getFIRWeigths ()
 
int iEta2cIndex (int iEta) const
 
void initCellThresholds (double barrelLowInterest, double endcapLowInterest, double barrelHighInterest, double endcapHighInterest)
 helpers for constructors More...
 
int internalThreshold (double thresholdInGeV, int iSubDet) const
 
int iPhi2cIndex (int iPhi) const
 
int iTTEta2cIndex (int iEta) const
 
int iTTPhi2cIndex (int iPhi) const
 
void setTtFlags (const edm::EventSetup &eventSetup, const EBDigiCollection &ebDigis, const EEDigiCollection &eeDigis)
 
void setTtFlags (const EcalTrigPrimDigiCollection &trigPrims)
 

Private Attributes

std::vector< int > actions_
 
EcalSelectiveReadout::ttFlag_t defaultTtf_
 
std::auto_ptr
< EcalSelectiveReadout
ecalSelectiveReadout
 
int firstFIRSample
 
std::vector< int > firWeights
 
int ievt_
 
int srFlags [2][8]
 
bool symetricZS
 
const
EcalTrigTowerConstituentsMap
theTriggerMap
 
double thrUnit [2]
 
bool trigPrimBypass_
 
double trigPrimBypassHTH_
 
double trigPrimBypassLTH_
 
int trigPrimBypassMode_
 
bool trigPrimBypassWithPeakFinder_
 
EcalSelectiveReadout::ttFlag_t ttFlags [nTriggerTowersInEta][nTriggerTowersInPhi]
 
bool ttThresOnCompressedEt_
 
std::vector< float > weights
 
int zsThreshold [2][4]
 

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

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

31  :
33  ievt_(0)
34 {
35 
36  firstFIRSample = settings->ecalDccZs1stSample_[0];
37  weights = settings->dccNormalizedWeights_[0];
38  symetricZS = settings->symetricZS_[0];
39  actions_ = settings->actions_;
40 
41 
42  int defTtf = params.getParameter<int>("defaultTtf");
43  if(defTtf < 0 || defTtf > 7){
44  throw cms::Exception("InvalidParameter") << "Value of EcalSelectiveReadoutProducer module parameter defaultTtf, "
45  << defaultTtf_ << ", is out of the valid range 0..7\n";
46  } else{
48  }
49 
50  bool actionValid = actions_.size()==8;
51  for(size_t i = 0; i < actions_.size(); ++i){
52  if(actions_[i] < 0 || actions_[i] > 7) actionValid = false;
53  }
54 
55  if(!actionValid){
56  throw cms::Exception("InvalidParameter") << "EcalSelectiveReadoutProducer module parameter 'actions' is "
57  "not valid. It must be a vector of 8 integer values comprised between 0 and 7\n";
58  }
59 
60  double adcToGeV = settings->ebDccAdcToGeV_;
61  thrUnit[BARREL] = adcToGeV/4.; //unit=1/4th ADC count
62 
63  adcToGeV = settings->eeDccAdcToGeV_;
64  thrUnit[ENDCAP] = adcToGeV/4.; //unit=1/4th ADC count
66  = auto_ptr<EcalSelectiveReadout>(new EcalSelectiveReadout(
67  settings->deltaEta_[0],
68  settings->deltaPhi_[0]));
69  const int eb = 0;
70  const int ee = 1;
72  settings->srpLowInterestChannelZS_[ee],
73  settings->srpHighInterestChannelZS_[eb],
74  settings->srpHighInterestChannelZS_[ee]
75  );
76  trigPrimBypass_ = params.getParameter<bool>("trigPrimBypass");
77  trigPrimBypassMode_ = params.getParameter<int>("trigPrimBypassMode");
79  = params.getParameter<bool>("trigPrimBypassWithPeakFinder");
80  trigPrimBypassLTH_ = params.getParameter<double>("trigPrimBypassLTH");
81  trigPrimBypassHTH_ = params.getParameter<double>("trigPrimBypassHTH");
82  if(trigPrimBypass_){
83  edm::LogWarning("Digitization") << "Beware a simplified trigger primitive "
84  "computation is used for the ECAL selective readout";
85  if(trigPrimBypassMode_ !=0 && trigPrimBypassMode_ !=1){
86  throw cms::Exception("InvalidParameter")
87  << "Invalid value for EcalSelectiveReadoutProducer parameter 'trigPrimBypassMode_'."
88  " Valid values are 0 and 1.\n";
89  }
90  ttThresOnCompressedEt_ = (trigPrimBypassMode_==1);
91  }
92 }
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
void initCellThresholds(double barrelLowInterest, double endcapLowInterest, double barrelHighInterest, double endcapHighInterest)
helpers for constructors
std::auto_ptr< EcalSelectiveReadout > ecalSelectiveReadout
std::vector< std::vector< float > > dccNormalizedWeights_
std::vector< float > srpHighInterestChannelZS_
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 207 of file EcalSelectiveReadoutSuppressor.cc.

References EcalMGPASample::adc(), firstFIRSample, EcalMGPASample::gainId(), getFIRWeigths(), nFIRTaps, query::result, edm::DataFrame::size(), and symetricZS.

Referenced by python.Vispa.Gui.BoxContentDialog.BoxContentDialog::apply(), python.Vispa.Plugins.ConfigEditor.ToolDialog.ToolDialog::apply(), and run().

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;
220  iSample<lastFIRSample; ++iSample, ++iWeight){
221  if(iSample>=0 && iSample < (int)frame.size()){
222  EcalMGPASample sample(frame[iSample]);
223  if(sample.gainId()!=gain12) 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) acc = -acc;
236  }
237 
238  //LogTrace("DccFir") << "\n";
239  //discards the 8 LSBs
240  //(result of shift operator on negative numbers depends on compiler
241  //implementation, therefore the value is offset to make sure it is positive
242  //before performing the bit shift).
243  acc = ((acc + (1<<30)) >>8) - (1 <<(30-8));
244 
245  //ZS passed if weigthed sum acc above ZS threshold or if
246  //one sample has a lower gain than gain 12 (that is gain 12 output
247  //is saturated)
248 
249  const bool result = (acc >= thr) || gain12saturated;
250 
251  //LogTrace("DccFir") << "acc: " << acc << "\n"
252  // << "threshold: " << thr << " ("
253  // << thr*thrUnit[((EcalDataFrame&)frame).id().subdetId()==EcalBarrel?0:1]
254  // << "GeV)\n"
255  // << "saturated: " << (gain12saturated?"yes":"no") << "\n"
256  // << "ZS passed: " << (result?"yes":"no")
257  // << (symetricZS?" (symetric cut)":"") << "\n";
258 
259  return result;
260 }
tuple result
Definition: query.py:137
size_type size() const
Definition: DataFrame.h:63
template<class T >
double EcalSelectiveReadoutSuppressor::frame2Energy ( const T frame,
int  timeOffset = 0 
) const
private

Definition at line 551 of file EcalSelectiveReadoutSuppressor.cc.

References benchmark_cfg::cerr, i, n, evf::evtn::offset(), and weights.

Referenced by setTtFlags().

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

For debugging purposes.

Definition at line 84 of file EcalSelectiveReadoutSuppressor.h.

References ecalSelectiveReadout.

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

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

References abs, firWeights, i, min, nFIRTaps, and weights.

Referenced by accept().

429  {
430  if(firWeights.size()==0){
431  firWeights = vector<int>(nFIRTaps, 0); //default weight: 0;
432  const static int maxWeight = 0xEFF; //weights coded on 11+1 signed bits
433  for(unsigned i=0; i < min((size_t)nFIRTaps,weights.size()); ++i){
434  firWeights[i] = lround(weights[i] * (1<<10));
435  if(abs(firWeights[i])>maxWeight){//overflow
436  firWeights[i] = firWeights[i]<0?-maxWeight:maxWeight;
437  }
438  }
439  }
440  return firWeights;
441 }
int i
Definition: DBlmapReader.cc:9
#define abs(x)
Definition: mlp_lapack.h:159
#define min(a, b)
Definition: mlp_lapack.h:161
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 113 of file EcalSelectiveReadoutSuppressor.cc.

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

Referenced by EcalSelectiveReadoutSuppressor().

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

References max(), min, and thrUnit.

Referenced by initCellThresholds().

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

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

References EcalSelectiveReadout::nTriggerTowersInEta, EcalSelectiveReadout::nTriggerTowersInPhi, tccFlagMarker, and ttFlags.

592  {
593  const char tccFlagMarker[] = { '?', '.', 'S', '?', 'C', 'E', 'E', 'E', 'E'};
596 
597  if(withHeader){
598  os << "# TCC flag map\n#\n"
599  "# +-->Phi " << tccFlagMarker[1+0] << ": 000 (low interest)\n"
600  "# | " << tccFlagMarker[1+1] << ": 001 (mid interest)\n"
601  "# | " << tccFlagMarker[1+2] << ": 010 (not valid)\n"
602  "# V Eta " << tccFlagMarker[1+3] << ": 011 (high interest)\n"
603  "# " << tccFlagMarker[1+4] << ": 1xx forced readout (Hw error)\n";
604  }
605 
606  if(iEvent>=0){
607  os << "#\n#Event " << iEvent << "\n";
608  }
609 
610  for(int iEta=0; iEta<nEta; ++iEta){
611  for(int iPhi=0; iPhi<nPhi; ++iPhi){
612  os << tccFlagMarker[ttFlags[iEta][iPhi]+1];
613  }
614  os << "\n";
615  }
616 }
const char tccFlagMarker[]
Definition: GenABIO.cc:189
EcalSelectiveReadout::ttFlag_t ttFlags[nTriggerTowersInEta][nTriggerTowersInPhi]
int iEvent
Definition: GenABIO.cc:243
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 262 of file EcalSelectiveReadoutSuppressor.cc.

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

265  {
266  EBDigiCollection selectedBarrelDigis;
267  EEDigiCollection selectedEndcapDigis;
268 
269  run(eventSetup, trigPrims, barrelDigis, endcapDigis,
270  &selectedBarrelDigis, &selectedEndcapDigis, 0, 0);
271 
272 //replaces the input with the suppressed version
273  barrelDigis.swap(selectedBarrelDigis);
274  endcapDigis.swap(selectedEndcapDigis);
275 }
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 279 of file EcalSelectiveReadoutSuppressor.cc.

References accept(), BARREL, edm::DataFrameContainer::begin(), EcalBarrel, ecalSelectiveReadout, edm::DataFrameContainer::end(), ENDCAP, edm::hlt::Exception, ievt_, LogDebug, nBarrelTriggerTowersInEta, nTriggerTowersInPhi, edm::DataFrameContainer::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.

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

References ecalSelectiveReadout.

100  {
101  ecalSelectiveReadout->setElecMap(map);
102 }
std::auto_ptr< EcalSelectiveReadout > ecalSelectiveReadout
void EcalSelectiveReadoutSuppressor::setGeometry ( const CaloGeometry caloGeometry)

Sets the geometry of the calorimeters

Definition at line 105 of file EcalSelectiveReadoutSuppressor.cc.

References ecalSelectiveReadout.

106 {
107 #ifndef ECALSELECTIVEREADOUT_NOGEOM
108  ecalSelectiveReadout->setGeometry(caloGeometry);
109 #endif
110 }
std::auto_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 95 of file EcalSelectiveReadoutSuppressor.cc.

References ecalSelectiveReadout, python.multivaluedict::map(), and theTriggerMap.

95  {
97  ecalSelectiveReadout->setTriggerMap(map);
98 }
std::auto_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 444 of file EcalSelectiveReadoutSuppressor.cc.

References edm::DataFrameContainer::begin(), DetId::Ecal, EcalBarrel, EcalEndcap, edm::DataFrameContainer::end(), 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, and ttFlags.

Referenced by run().

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

394  {
395  for(size_t iEta0 = 0; iEta0 < nTriggerTowersInEta; ++iEta0){
396  for(size_t iPhi0 = 0; iPhi0 < nTriggerTowersInPhi; ++iPhi0){
397  ttFlags[iEta0][iPhi0] = defaultTtf_;
398  }
399  }
400  for(EcalTrigPrimDigiCollection::const_iterator trigPrim = trigPrims.begin();
401  trigPrim != trigPrims.end(); ++trigPrim){
402  int iEta = trigPrim->id().ieta();
403  unsigned int iEta0;
404  if(iEta<0){ //z- half ECAL: transforming ranges -28;-1 => 0;27
405  iEta0 = iEta + nTriggerTowersInEta/2;
406  } else{ //z+ halfECAL: transforming ranges 1;28 => 28;55
407  iEta0 = iEta + nTriggerTowersInEta/2 - 1;
408  }
409 
410  unsigned int iPhi0 = trigPrim->id().iphi() - 1;
411 
413  ttFlags[iEta0][iPhi0] =
414  (EcalSelectiveReadout::ttFlag_t) trigPrim->ttFlag();
415  } else{
416  int compressedEt = trigPrim->compressedEt();
417  if(compressedEt < trigPrimBypassLTH_){
419  } else if(compressedEt < trigPrimBypassHTH_){
421  } else{
423  }
424  }
425  }
426 }
std::vector< T >::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::auto_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][4]
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().