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 > &, 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 findQualityFiles::size, and strip().

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 }
void strip(std::string &input, const std::string &blanks=" \n\t")
Definition: stringTools.cc:16
edm::ESHandle< SiStripNoises > noiseHandle
std::pair< ContainerIterator, ContainerIterator > Range
std::pair< ContainerIterator, ContainerIterator > Range
Definition: SiStripNoises.h:41
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 349 of file SiStripFedZeroSuppression.cc.

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

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

Referenced by SiStripDigitizerAlgorithm::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
void strip(std::string &input, const std::string &blanks=" \n\t")
Definition: stringTools.cc:16
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:41
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 strip().

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()
void strip(std::string &input, const std::string &blanks=" \n\t")
Definition: stringTools.cc:16
uint16_t truncate(int16_t adc) const
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:77
det_id_type id
Definition: DetSet.h:76
std::pair< ContainerIterator, ContainerIterator > Range
Definition: SiStripNoises.h:41
collection_type::const_iterator const_iterator
Definition: DetSet.h:32
edm::ESHandle< SiStripThreshold > thresholdHandle
void SiStripFedZeroSuppression::suppress ( const std::vector< int16_t > &  in,
edm::DetSet< SiStripDigi > &  out 
)

Definition at line 246 of file SiStripFedZeroSuppression.cc.

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

246  {
247 
248  const uint32_t detID = out.id;
249  size_t size = in.size();
250 #ifdef DEBUG_SiStripZeroSuppression_
251  if (edm::isDebugEnabled())
252  LogTrace("SiStripZeroSuppression") << "[SiStripFedZeroSuppression::suppress] Zero suppression on std::vector<int16_t>: detID " << detID << " size = " << in.size();
253 #endif
254 
255  fillThresholds_(detID, size); // want to decouple this from the other cost
256 
257  std::vector<int16_t>::const_iterator in_iter=in.begin();
258  for (size_t strip = 0; strip < size; ++strip, ++in_iter){
259 
260  size_t strip_mod_128 = strip & 127;
261 #ifdef DEBUG_SiStripZeroSuppression_
262  if (edm::isDebugEnabled())
263  LogTrace("SiStripZeroSuppression") << "[SiStripFedZeroSuppression::suppress] detID= " << detID << " strip= " << strip << " adc= " << *in_iter;
264 #endif
265  adc = *in_iter;
266 
269 
270  //Find adc values for neighbouring strips
271 
272  /*
273  If a strip is the last one on the chip
274  set its next neighbor's thresholds to infinity
275  because the FED does not merge clusters across
276  chip boundaries right now
277  */
278 
279  //adcPrev = -9999; // useless, they are set
280  //adcNext = -9999; // in the next lines in any case
281  if ( strip_mod_128 == 127 ) {
282  adcNext = 0;
283  theNextFEDlowThresh = 9999;
284  theNextFEDhighThresh = 9999;
285  } else {
286  adcNext = *(in_iter+1);
289  }
290 
291  /*
292  Similarily, for the first strip
293  on a chip
294  */
295  if ( strip_mod_128 == 0 ) {
296  adcPrev = 0;
297  thePrevFEDlowThresh = 9999;
298  thePrevFEDhighThresh = 9999;
299  } else {
300  adcPrev = *(in_iter-1);
303  }
304 
305  if ( adcNext < adcPrev){
309  } else {
313  }
314 
315  //Find adc values for next neighbouring strips
316  //adcPrev2 = -9999; //
317  //adcNext2 = -9999; // useless to set them here
318  //thePrev2FEDlowThresh = 1; // they are overwritten always in the next 8 lines
319  //theNext2FEDlowThresh = 1; //
320  if ( strip_mod_128 >=126 ) {
321  adcNext2 = 0;
322  theNext2FEDlowThresh = 9999;
323  //} else if ( strip_mod_128 < 126 ) { // if it's not >= then is <, no need to "if" again
324  } else {
325  adcNext2 = *(in_iter+2);
327  }
328  if ( strip_mod_128 <= 1 ) {
329  adcPrev2 = 0;
330  thePrev2FEDlowThresh = 9999;
331  //} else if ( strip_mod_128 > 1 ) { // same as above
332  } else {
333  adcPrev2 = *(in_iter-2);
335  }
336 
337  if (IsAValidDigi()){
338 #ifdef DEBUG_SiStripZeroSuppression_
339  if (edm::isDebugEnabled())
340  LogTrace("SiStripZeroSuppression") << "[SiStripFedZeroSuppression::suppress] DetId " << out.id << " strip " << strip << " adc " << *in_iter << " digiCollection size " << out.data.size() ;
341 #endif
342  //GB 23/6/08: truncation should be done at the very beginning
343  out.push_back(SiStripDigi(strip, (*in_iter<0 ? 0 : truncate( *in_iter ) )));
344  }
345  }
346 }
bool isDebugEnabled()
void push_back(const T &t)
Definition: DetSet.h:67
void strip(std::string &input, const std::string &blanks=" \n\t")
Definition: stringTools.cc:16
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:77
det_id_type id
Definition: DetSet.h:76
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.