CMS 3D CMS Logo

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

#include <SiStripFedZeroSuppression.h>

Public Member Functions

void init (const edm::EventSetup &es)
 
bool IsAValidDigi ()
 
 SiStripFedZeroSuppression (uint16_t fedalgo, bool trunc=true)
 
void suppress (const std::vector< SiStripDigi > &, std::vector< SiStripDigi > &, const uint32_t &, edm::ESHandle< SiStripNoises > &, edm::ESHandle< SiStripThreshold > &)
 
void suppress (const std::vector< SiStripDigi > &, std::vector< SiStripDigi > &, const uint32_t &)
 
void suppress (const edm::DetSet< SiStripRawDigi > &, edm::DetSet< SiStripDigi > &)
 
void suppress (const std::vector< int16_t > &, const uint16_t &, edm::DetSet< SiStripDigi > &)
 
 ~SiStripFedZeroSuppression ()
 

Private Member Functions

void fillThresholds_ (const uint32_t detID, size_t size)
 
uint16_t truncate (int16_t adc) const
 

Private Attributes

int16_t adc
 
int16_t adcMaxNeigh
 
int16_t adcNext
 
int16_t adcNext2
 
int16_t adcPrev
 
int16_t adcPrev2
 
bool doTruncate
 
std::vector< int16_t > highThr_
 
std::vector< float > highThrSN_
 
std::vector< int16_t > lowThr_
 
std::vector< float > lowThrSN_
 
uint32_t noise_cache_id
 
edm::ESHandle< SiStripNoisesnoiseHandle
 
std::vector< float > noises_
 
uint16_t theFEDalgorithm
 
int16_t theFEDhighThresh
 
int16_t theFEDlowThresh
 
int16_t theNeighFEDhighThresh
 
int16_t theNeighFEDlowThresh
 
int16_t theNext2FEDlowThresh
 
int16_t theNextFEDhighThresh
 
int16_t theNextFEDlowThresh
 
int16_t thePrev2FEDlowThresh
 
int16_t thePrevFEDhighThresh
 
int16_t thePrevFEDlowThresh
 
uint32_t threshold_cache_id
 
edm::ESHandle< SiStripThresholdthresholdHandle
 

Friends

class SiStripRawProcessingFactory
 

Detailed Description

Definition at line 17 of file SiStripFedZeroSuppression.h.

Constructor & Destructor Documentation

SiStripFedZeroSuppression::SiStripFedZeroSuppression ( uint16_t  fedalgo,
bool  trunc = true 
)
inline
SiStripFedZeroSuppression::~SiStripFedZeroSuppression ( )
inline

Definition at line 28 of file SiStripFedZeroSuppression.h.

28 {};

Member Function Documentation

void SiStripFedZeroSuppression::fillThresholds_ ( const uint32_t  detID,
size_t  size 
)
private

Definition at line 219 of file SiStripFedZeroSuppression.cc.

References alignCSCRings::e, and findQualityFiles::size.

219  {
220  SiStripNoises::Range detNoiseRange = noiseHandle->getRange(detID);
221  SiStripThreshold::Range detThRange = thresholdHandle->getRange(detID);
222 
223  if (highThr_.size() != size) {
224  highThr_.resize(size);
225  lowThr_.resize(size);
226  noises_.resize(size);
227  highThrSN_.resize(size);
228  lowThrSN_.resize(size);
229  }
230 
231  noiseHandle->allNoises(noises_, detNoiseRange);
232  thresholdHandle->allThresholds(lowThrSN_, highThrSN_, detThRange); // thresholds as S/N
233  for (size_t strip = 0; strip < size; ++strip) {
234  float noise = noises_[strip];
235  // uncomment line below to check bluk noise decoding
236  //assert( noise == noiseHandle->getNoiseFast(strip,detNoiseRange) );
237  highThr_[strip] = static_cast<int16_t>(highThrSN_[strip]*noise+0.5+1e-6);
238  lowThr_[strip] = static_cast<int16_t>( lowThrSN_[strip]*noise+0.5+1e-6);
239  // Note: it's a bit wierd, but there are some cases for which 'highThrSN_[strip]*noise' is an exact integer
240  // but due to roundoffs it gets rounded to the integer below if.
241  // Apparently the optimized code inlines differently and this changes the roundoff.
242  // The +1e-6 fixes the problem. [GPetruc]
243  }
244 }
edm::ESHandle< SiStripNoises > noiseHandle
std::pair< ContainerIterator, ContainerIterator > Range
std::pair< ContainerIterator, ContainerIterator > Range
Definition: SiStripNoises.h:48
tuple size
Write out results.
edm::ESHandle< SiStripThreshold > thresholdHandle
void SiStripFedZeroSuppression::init ( const edm::EventSetup es)

Definition at line 12 of file SiStripFedZeroSuppression.cc.

References edm::EventSetup::get().

12  {
13  uint32_t n_cache_id = es.get<SiStripNoisesRcd>().cacheIdentifier();
14  uint32_t t_cache_id = es.get<SiStripThresholdRcd>().cacheIdentifier();
15 
16  if(n_cache_id != noise_cache_id) {
17  es.get<SiStripNoisesRcd>().get( noiseHandle );
18  noise_cache_id = n_cache_id;
19  }
20  if(t_cache_id != threshold_cache_id) {
22  threshold_cache_id = t_cache_id;
23  }
24 }
edm::ESHandle< SiStripNoises > noiseHandle
const T & get() const
Definition: EventSetup.h:55
edm::ESHandle< SiStripThreshold > thresholdHandle
bool SiStripFedZeroSuppression::IsAValidDigi ( )

Definition at line 352 of file SiStripFedZeroSuppression.cc.

References accept(), ecalMGPA::adc(), edm::isDebugEnabled(), and LogTrace.

353 {
354 
355 #ifdef DEBUG_SiStripZeroSuppression_
356 
357 
358  if (edm::isDebugEnabled()){
359 
360  LogTrace("SiStripZeroSuppression") << "[SiStripFedZeroSuppression::suppress] "
361  << "\n\t adc " << adc
362  << "\n\t adcPrev " << adcPrev
363  << "\n\t adcNext " << adcNext
364  << "\n\t adcMaxNeigh " << adcMaxNeigh
365  << "\n\t adcPrev2 " << adcPrev2
366  << "\n\t adcNext2 " << adcNext2
367  <<std::endl;
368 
369  LogTrace("SiStripZeroSuppression") << "[SiStripFedZeroSuppression::suppress] "
370  << "\n\t theFEDlowThresh " << theFEDlowThresh
371  << "\n\t theFEDhighThresh " << theFEDhighThresh
372  << "\n\t thePrevFEDlowThresh " << thePrevFEDlowThresh
373  << "\n\t thePrevFEDhighThresh " << thePrevFEDhighThresh
374  << "\n\t theNextFEDlowThresh " << theNextFEDlowThresh
375  << "\n\t theNextFEDhighThresh " << theNextFEDhighThresh
376  << "\n\t theNeighFEDlowThresh " << theNeighFEDlowThresh
377  << "\n\t theNeighFEDhighThresh " << theNeighFEDhighThresh
378  << "\n\t thePrev2FEDlowThresh " << thePrev2FEDlowThresh
379  << "\n\t theNext2FEDlowThresh " << theNext2FEDlowThresh
380  <<std::endl;
381  }
382 #endif
383  // Decide if this strip should be accepted.
384  bool accept = false;
385  switch (theFEDalgorithm) {
386  case 1:
387  accept = (adc >= theFEDlowThresh);
388  break;
389  case 2:
390  accept = (adc >= theFEDhighThresh || (adc >= theFEDlowThresh &&
392  break;
393  case 3:
394  accept = (adc >= theFEDhighThresh || (adc >= theFEDlowThresh &&
395  adcMaxNeigh >= theNeighFEDhighThresh));
396  break;
397  case 4:
398  accept = (
399  (adc >= theFEDhighThresh) //Test for adc>highThresh (same as algorithm 2)
400  ||
401  (
402  (adc >= theFEDlowThresh) //Test for adc>lowThresh, with neighbour adc>lowThresh (same as algorithm 2)
403  &&
404  (adcMaxNeigh >= theNeighFEDlowThresh)
405  )
406  ||
407  (
408  (adc < theFEDlowThresh) //Test for adc<lowThresh
409  &&
410  (
411  (
412  (adcPrev >= thePrevFEDhighThresh) //with both neighbours>highThresh
413  &&
415  )
416  ||
417  (
418  (adcPrev >= thePrevFEDhighThresh) //OR with previous neighbour>highThresh and
419  &&
420  (adcNext >= theNextFEDlowThresh) //both the next neighbours>lowThresh
421  &&
423  )
424  ||
425  (
426  (adcNext >= theNextFEDhighThresh) //OR with next neighbour>highThresh and
427  &&
428  (adcPrev >= thePrevFEDlowThresh) //both the previous neighbours>lowThresh
429  &&
431  )
432  ||
433  (
434  (adcNext >= theNextFEDlowThresh) //OR with both next neighbours>lowThresh and
435  &&
436  (adcNext2 >= theNext2FEDlowThresh) //both the previous neighbours>lowThresh
437  &&
439  &&
441  )
442  )
443  )
444  );
445  break;
446  }
447  return accept;
448 }
bool isDebugEnabled()
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:25
#define LogTrace(id)
void SiStripFedZeroSuppression::suppress ( const std::vector< SiStripDigi > &  in,
std::vector< SiStripDigi > &  selectedSignal,
const uint32_t &  detID,
edm::ESHandle< SiStripNoises > &  noiseHandle,
edm::ESHandle< SiStripThreshold > &  thresholdHandle 
)

Definition at line 30 of file SiStripFedZeroSuppression.cc.

References ecalMGPA::adc(), SiStripThreshold::Data::getHth(), SiStripThreshold::Data::getLth(), i, and fff_deleter::thresholds.

Referenced by DigiSimLinkAlgorithm::run().

31  {
32 
33  int i;
34  int inSize = in.size();
35  SiStripNoises::Range detNoiseRange = noiseHandle->getRange(detID);
36  SiStripThreshold::Range detThRange = thresholdHandle->getRange(detID);
37 
38  // reserving more than needed, but quicker than one at a time
39  selectedSignal.clear();
40  selectedSignal.reserve(inSize);
41  for (i = 0; i < inSize; i++) {
42  //Find adc values for neighbouring strips
43  const uint32_t strip = (uint32_t) in[i].strip();
44 
45  adc = in[i].adc();
46 
47  SiStripThreshold::Data thresholds=thresholdHandle->getData(strip,detThRange);
48  theFEDlowThresh = static_cast<int16_t>(thresholds.getLth()*noiseHandle->getNoiseFast(strip,detNoiseRange)+0.5);
49  theFEDhighThresh = static_cast<int16_t>(thresholds.getHth()*noiseHandle->getNoiseFast(strip,detNoiseRange)+0.5);
50 
51  adcPrev = -9999;
52  adcNext = -9999;
53  adcPrev2 = -9999;
54  adcNext2 = -9999;
55 
56  /*
57  Since we are not running on
58  Raw data we need to initialize
59  all the FED threshold
60  */
61 
67 
71 
72  if ( ((strip)%128) == 127){
73  adcNext = 0;
74  theNextFEDlowThresh = 9999;
75  theNextFEDhighThresh = 9999;
76  }else if (i + 1 < inSize && in[i+1].strip() == strip + 1) {
77  adcNext = in[i+1].adc();
78  SiStripThreshold::Data thresholds_1=thresholdHandle->getData(strip+1,detThRange);
79  theNextFEDlowThresh = static_cast<int16_t>(thresholds_1.getLth()*noiseHandle->getNoiseFast(strip+1,detNoiseRange)+0.5);
80  theNextFEDhighThresh = static_cast<int16_t>(thresholds_1.getHth()*noiseHandle->getNoiseFast(strip+1,detNoiseRange)+0.5);
81  if ( ((strip)%128) == 126){
82  adcNext2 = 0;
83  theNext2FEDlowThresh = 9999;
84  }else if (i + 2 < inSize && in[i+2].strip() == strip + 2) {
85  adcNext2 = in[i+2].adc();
86  theNext2FEDlowThresh = static_cast<int16_t>(thresholdHandle->getData(strip+2,detThRange).getLth()*noiseHandle->getNoiseFast(strip+2,detNoiseRange)+0.5);
87  }
88  }
89 
90  if ( ((strip)%128) == 0){
91  adcPrev = 0;
92  thePrevFEDlowThresh = 9999;
93  thePrevFEDhighThresh = 9999;
94  }else if (i - 1 >= 0 && in[i-1].strip() == strip - 1) {
95  adcPrev = in[i-1].adc();
96  SiStripThreshold::Data thresholds_1=thresholdHandle->getData(strip-1,detThRange);
97  thePrevFEDlowThresh = static_cast<int16_t>(thresholds_1.getLth()*noiseHandle->getNoiseFast(strip-1,detNoiseRange)+0.5);
98  thePrevFEDhighThresh = static_cast<int16_t>(thresholds_1.getHth()*noiseHandle->getNoiseFast(strip-1,detNoiseRange)+0.5);
99  if ( ((strip)%128) == 1){
100  adcPrev2 = 0;
101  thePrev2FEDlowThresh = 9999;
102  }else if (i - 2 >= 0 && in[i-2].strip() == strip - 2) {
103  adcPrev2 = in[i-2].adc();
104  thePrev2FEDlowThresh = static_cast<int16_t>(thresholdHandle->getData(strip-2,detThRange).getLth()*noiseHandle->getNoiseFast(strip-2,detNoiseRange)+0.5);
105  }
106  }
107 
108  if ( adcNext <= adcPrev){
112  } else {
116  }
117 
118  if (IsAValidDigi()){
119  selectedSignal.push_back(SiStripDigi(strip, adc));
120  }
121  }
122 }
int i
Definition: DBlmapReader.cc:9
dictionary thresholds
Definition: fff_deleter.py:273
A Digi for the silicon strip detector, containing both strip and adc information, and suitable for st...
Definition: SiStripDigi.h:12
std::pair< ContainerIterator, ContainerIterator > Range
std::pair< ContainerIterator, ContainerIterator > Range
Definition: SiStripNoises.h:48
void SiStripFedZeroSuppression::suppress ( const std::vector< SiStripDigi > &  in,
std::vector< SiStripDigi > &  selectedSignal,
const uint32_t &  detID 
)

Definition at line 26 of file SiStripFedZeroSuppression.cc.

References suppress.

26  {
27  suppress(in, selectedSignal, detID, noiseHandle, thresholdHandle);
28 }
edm::ESHandle< SiStripNoises > noiseHandle
void suppress(const std::vector< SiStripDigi > &, std::vector< SiStripDigi > &, const uint32_t &, edm::ESHandle< SiStripNoises > &, edm::ESHandle< SiStripThreshold > &)
edm::ESHandle< SiStripThreshold > thresholdHandle
void SiStripFedZeroSuppression::suppress ( const edm::DetSet< SiStripRawDigi > &  in,
edm::DetSet< SiStripDigi > &  out 
)

Definition at line 124 of file SiStripFedZeroSuppression.cc.

References ecalMGPA::adc(), edm::DetSet< T >::data, SiStripThreshold::Data::getHth(), SiStripThreshold::Data::getLth(), edm::DetSet< T >::id, edm::isDebugEnabled(), LogTrace, and fff_deleter::thresholds.

125 {
126  const uint32_t detID = out.id;
127  SiStripNoises::Range detNoiseRange = noiseHandle->getRange(detID);
128  SiStripThreshold::Range detThRange = thresholdHandle->getRange(detID);
129 #ifdef DEBUG_SiStripZeroSuppression_
130  if (edm::isDebugEnabled())
131  LogTrace("SiStripZeroSuppression") << "[SiStripFedZeroSuppression::suppress] Zero suppression on edm::DetSet<SiStripRawDigi>: detID " << detID << " size = " << in.data.size();
132 #endif
134  for (;in_iter!=in.data.end();in_iter++){
135 
136  const uint32_t strip = (uint32_t) (in_iter-in.data.begin());
137 
138 #ifdef DEBUG_SiStripZeroSuppression_
139  if (edm::isDebugEnabled())
140  LogTrace("SiStripZeroSuppression") << "[SiStripFedZeroSuppression::suppress] detID= " << detID << " strip= " << strip << " adc= " << in_iter->adc();
141 #endif
142  adc = in_iter->adc();
143 
144  SiStripThreshold::Data thresholds=thresholdHandle->getData(strip,detThRange);
145  theFEDlowThresh = static_cast<int16_t>(thresholds.getLth()*noiseHandle->getNoiseFast(strip,detNoiseRange)+0.5);
146  theFEDhighThresh = static_cast<int16_t>(thresholds.getHth()*noiseHandle->getNoiseFast(strip,detNoiseRange)+0.5);
147 
148  adcPrev = -9999;
149  adcNext = -9999;
150  /*
151  If a strip is the last one on the chip
152  set its next neighbor's thresholds to infinity
153  because the FED does not merge clusters across
154  chip boundaries right now
155  */
156  if ( strip%128 == 127 ) {
157  adcNext = 0;
158  theNextFEDlowThresh = 9999;
159  theNextFEDhighThresh = 9999;
160  }
161  else {
162  adcNext = (in_iter+1)->adc();
163  SiStripThreshold::Data thresholds_1=thresholdHandle->getData(strip+1,detThRange);
164  theNextFEDlowThresh = static_cast<int16_t>(thresholds_1.getLth()*noiseHandle->getNoiseFast(strip+1,detNoiseRange)+0.5);
165  theNextFEDhighThresh = static_cast<int16_t>(thresholds_1.getHth()*noiseHandle->getNoiseFast(strip+1,detNoiseRange)+0.5);
166  }
167  /*
168  Similarily, for the first strip
169  on a chip
170  */
171  if ( strip%128 == 0 ) {
172  adcPrev = 0;
173  thePrevFEDlowThresh = 9999;
174  thePrevFEDhighThresh = 9999;
175  }
176  else {
177  adcPrev = (in_iter-1)->adc();
178  SiStripThreshold::Data thresholds_1=thresholdHandle->getData(strip-1,detThRange);
179  thePrevFEDlowThresh = static_cast<int16_t>(thresholds_1.getLth()*noiseHandle->getNoiseFast(strip-1,detNoiseRange)+0.5);
180  thePrevFEDhighThresh = static_cast<int16_t>(thresholds_1.getHth()*noiseHandle->getNoiseFast(strip-1,detNoiseRange)+0.5);
181  }
182  if ( adcNext < adcPrev){
186  } else {
190  }
191 
192  //Find adc values for next neighbouring strips
193  adcPrev2 = -9999;
194  adcNext2 = -9999;
197  if ( strip%128 >= 126 ) {
198  adcNext2 = 0;
199  theNext2FEDlowThresh = 9999;
200  }
201  else if ( strip%128 < 126 ) {
202  adcNext2 = (in_iter+2)->adc();
203  theNext2FEDlowThresh = static_cast<int16_t>(thresholdHandle->getData(strip+2,detThRange).getLth()*noiseHandle->getNoiseFast(strip+2,detNoiseRange)+0.5);
204  }
205  if ( strip%128 <= 1 ) {
206  adcPrev2 = 0;
207  thePrev2FEDlowThresh = 9999;
208  }
209  else if ( strip%128 > 1 ) {
210  adcPrev2 = (in_iter-2)->adc();
211  thePrev2FEDlowThresh = static_cast<int16_t>(thresholdHandle->getData(strip-2,detThRange).getLth()*noiseHandle->getNoiseFast(strip-2,detNoiseRange)+0.5);
212  }
213  //GB 23/6/08: truncation should be done at the very beginning
214  if (IsAValidDigi())
215  out.data.push_back(SiStripDigi(strip, truncate(in_iter->adc())));
216  }
217 }
bool isDebugEnabled()
uint16_t truncate(int16_t adc) const
dictionary thresholds
Definition: fff_deleter.py:273
edm::ESHandle< SiStripNoises > noiseHandle
A Digi for the silicon strip detector, containing both strip and adc information, and suitable for st...
Definition: SiStripDigi.h:12
#define LogTrace(id)
std::pair< ContainerIterator, ContainerIterator > Range
collection_type data
Definition: DetSet.h:78
det_id_type id
Definition: DetSet.h:77
std::pair< ContainerIterator, ContainerIterator > Range
Definition: SiStripNoises.h:48
collection_type::const_iterator const_iterator
Definition: DetSet.h:33
edm::ESHandle< SiStripThreshold > thresholdHandle
void SiStripFedZeroSuppression::suppress ( const std::vector< int16_t > &  in,
const uint16_t &  firstAPV,
edm::DetSet< SiStripDigi > &  out 
)

Definition at line 247 of file SiStripFedZeroSuppression.cc.

References ecalMGPA::adc(), edm::DetSet< T >::data, edm::DetSet< T >::id, edm::isDebugEnabled(), LogTrace, edm::DetSet< T >::push_back(), and findQualityFiles::size.

247  {
248 
249  const uint32_t detID = out.id;
250  size_t size = in.size();
251 #ifdef DEBUG_SiStripZeroSuppression_
252  if (edm::isDebugEnabled())
253  LogTrace("SiStripZeroSuppression") << "[SiStripFedZeroSuppression::suppress] Zero suppression on std::vector<int16_t>: detID " << detID << " size = " << in.size();
254 #endif
255 
256  fillThresholds_(detID, size+firstAPV*128); // want to decouple this from the other cost
257 
258 
259  std::vector<int16_t>::const_iterator in_iter=in.begin();
260  uint16_t strip = firstAPV*128;
261  for (; strip < size+firstAPV*128; ++strip, ++in_iter){
262 
263  size_t strip_mod_128 = strip & 127;
264 #ifdef DEBUG_SiStripZeroSuppression_
265  if (edm::isDebugEnabled())
266  LogTrace("SiStripZeroSuppression") << "[SiStripFedZeroSuppression::suppress] detID= " << detID << " strip= " << strip << " adc= " << *in_iter;
267 #endif
268  adc = *in_iter;
269 
270  theFEDlowThresh = lowThr_[strip];
271  theFEDhighThresh = highThr_[strip];
272 
273  //Find adc values for neighbouring strips
274 
275  /*
276  If a strip is the last one on the chip
277  set its next neighbor's thresholds to infinity
278  because the FED does not merge clusters across
279  chip boundaries right now
280  */
281 
282  //adcPrev = -9999; // useless, they are set
283  //adcNext = -9999; // in the next lines in any case
284  if ( strip_mod_128 == 127 ) {
285  adcNext = 0;
286  theNextFEDlowThresh = 9999;
287  theNextFEDhighThresh = 9999;
288  } else {
289  adcNext = *(in_iter+1);
290  theNextFEDlowThresh = lowThr_[strip+1];
291  theNextFEDhighThresh = highThr_[strip+1];
292  }
293 
294  /*
295  Similarily, for the first strip
296  on a chip
297  */
298  if ( strip_mod_128 == 0 ) {
299  adcPrev = 0;
300  thePrevFEDlowThresh = 9999;
301  thePrevFEDhighThresh = 9999;
302  } else {
303  adcPrev = *(in_iter-1);
304  thePrevFEDlowThresh = lowThr_[strip-1];
305  thePrevFEDhighThresh = highThr_[strip-1];
306  }
307 
308  if ( adcNext < adcPrev){
312  } else {
316  }
317 
318  //Find adc values for next neighbouring strips
319  //adcPrev2 = -9999; //
320  //adcNext2 = -9999; // useless to set them here
321  //thePrev2FEDlowThresh = 1; // they are overwritten always in the next 8 lines
322  //theNext2FEDlowThresh = 1; //
323  if ( strip_mod_128 >=126 ) {
324  adcNext2 = 0;
325  theNext2FEDlowThresh = 9999;
326  //} else if ( strip_mod_128 < 126 ) { // if it's not >= then is <, no need to "if" again
327  } else {
328  adcNext2 = *(in_iter+2);
329  theNext2FEDlowThresh = lowThr_[strip+2];
330  }
331  if ( strip_mod_128 <= 1 ) {
332  adcPrev2 = 0;
333  thePrev2FEDlowThresh = 9999;
334  //} else if ( strip_mod_128 > 1 ) { // same as above
335  } else {
336  adcPrev2 = *(in_iter-2);
337  thePrev2FEDlowThresh = lowThr_[strip-2];;
338  }
339 
340  if (IsAValidDigi()){
341 #ifdef DEBUG_SiStripZeroSuppression_
342  if (edm::isDebugEnabled())
343  LogTrace("SiStripZeroSuppression") << "[SiStripFedZeroSuppression::suppress] DetId " << out.id << " strip " << strip << " adc " << *in_iter << " digiCollection size " << out.data.size() ;
344 #endif
345  //GB 23/6/08: truncation should be done at the very beginning
346  out.push_back(SiStripDigi(strip, (*in_iter<0 ? 0 : truncate( *in_iter ) )));
347  }
348  }
349 }
bool isDebugEnabled()
void push_back(const T &t)
Definition: DetSet.h:68
uint16_t truncate(int16_t adc) const
A Digi for the silicon strip detector, containing both strip and adc information, and suitable for st...
Definition: SiStripDigi.h:12
#define LogTrace(id)
collection_type data
Definition: DetSet.h:78
det_id_type id
Definition: DetSet.h:77
void fillThresholds_(const uint32_t detID, size_t size)
tuple size
Write out results.
uint16_t SiStripFedZeroSuppression::truncate ( int16_t  adc) const
inlineprivate

Definition at line 40 of file SiStripFedZeroSuppression.h.

References adc, and doTruncate.

40  {
41  if(adc>253 && doTruncate) return ((adc==1023) ? 255 : 254);
42  return adc;
43  };

Friends And Related Function Documentation

friend class SiStripRawProcessingFactory
friend

Definition at line 19 of file SiStripFedZeroSuppression.h.

Member Data Documentation

int16_t SiStripFedZeroSuppression::adc
private

Definition at line 55 of file SiStripFedZeroSuppression.h.

Referenced by truncate().

int16_t SiStripFedZeroSuppression::adcMaxNeigh
private

Definition at line 58 of file SiStripFedZeroSuppression.h.

int16_t SiStripFedZeroSuppression::adcNext
private

Definition at line 57 of file SiStripFedZeroSuppression.h.

int16_t SiStripFedZeroSuppression::adcNext2
private

Definition at line 60 of file SiStripFedZeroSuppression.h.

int16_t SiStripFedZeroSuppression::adcPrev
private

Definition at line 56 of file SiStripFedZeroSuppression.h.

int16_t SiStripFedZeroSuppression::adcPrev2
private

Definition at line 59 of file SiStripFedZeroSuppression.h.

bool SiStripFedZeroSuppression::doTruncate
private

Definition at line 50 of file SiStripFedZeroSuppression.h.

Referenced by truncate().

std::vector<int16_t> SiStripFedZeroSuppression::highThr_
private

Definition at line 74 of file SiStripFedZeroSuppression.h.

std::vector<float> SiStripFedZeroSuppression::highThrSN_
private

Definition at line 75 of file SiStripFedZeroSuppression.h.

std::vector<int16_t> SiStripFedZeroSuppression::lowThr_
private

Definition at line 74 of file SiStripFedZeroSuppression.h.

std::vector<float> SiStripFedZeroSuppression::lowThrSN_
private

Definition at line 75 of file SiStripFedZeroSuppression.h.

uint32_t SiStripFedZeroSuppression::noise_cache_id
private

Definition at line 47 of file SiStripFedZeroSuppression.h.

edm::ESHandle<SiStripNoises> SiStripFedZeroSuppression::noiseHandle
private

Definition at line 43 of file SiStripFedZeroSuppression.h.

std::vector<float> SiStripFedZeroSuppression::noises_
private

Definition at line 76 of file SiStripFedZeroSuppression.h.

uint16_t SiStripFedZeroSuppression::theFEDalgorithm
private

Definition at line 49 of file SiStripFedZeroSuppression.h.

int16_t SiStripFedZeroSuppression::theFEDhighThresh
private

Definition at line 53 of file SiStripFedZeroSuppression.h.

int16_t SiStripFedZeroSuppression::theFEDlowThresh
private

Definition at line 52 of file SiStripFedZeroSuppression.h.

int16_t SiStripFedZeroSuppression::theNeighFEDhighThresh
private

Definition at line 68 of file SiStripFedZeroSuppression.h.

int16_t SiStripFedZeroSuppression::theNeighFEDlowThresh
private

Definition at line 67 of file SiStripFedZeroSuppression.h.

int16_t SiStripFedZeroSuppression::theNext2FEDlowThresh
private

Definition at line 71 of file SiStripFedZeroSuppression.h.

int16_t SiStripFedZeroSuppression::theNextFEDhighThresh
private

Definition at line 65 of file SiStripFedZeroSuppression.h.

int16_t SiStripFedZeroSuppression::theNextFEDlowThresh
private

Definition at line 64 of file SiStripFedZeroSuppression.h.

int16_t SiStripFedZeroSuppression::thePrev2FEDlowThresh
private

Definition at line 70 of file SiStripFedZeroSuppression.h.

int16_t SiStripFedZeroSuppression::thePrevFEDhighThresh
private

Definition at line 63 of file SiStripFedZeroSuppression.h.

int16_t SiStripFedZeroSuppression::thePrevFEDlowThresh
private

Definition at line 62 of file SiStripFedZeroSuppression.h.

uint32_t SiStripFedZeroSuppression::threshold_cache_id
private

Definition at line 47 of file SiStripFedZeroSuppression.h.

edm::ESHandle<SiStripThreshold> SiStripFedZeroSuppression::thresholdHandle
private

Definition at line 46 of file SiStripFedZeroSuppression.h.