CMS 3D CMS Logo

SiStripFedZeroSuppression.h
Go to the documentation of this file.
1 #ifndef RECOLOCALTRACKER_SISTRIPZEROSUPPRESSION_SISTRIPZEROSUPPRESSOR_H
2 #define RECOLOCALTRACKER_SISTRIPZEROSUPPRESSION_SISTRIPZEROSUPPRESSOR_H
3 
8 
11 
12 #include <vector>
13 class SiStripNoises;
14 class SiStripThreshold;
15 
18 
19 public:
20  SiStripFedZeroSuppression(uint16_t fedalgo, bool trunc = true, bool trunc10bits = false)
21  : noise_cache_id(0),
23  theFEDalgorithm(fedalgo),
25  doTruncate10bits(trunc10bits) {}
27  void init(const edm::EventSetup& es);
28  void suppress(const std::vector<SiStripDigi>& in,
29  std::vector<SiStripDigi>& selectedSignal,
30  uint32_t detId,
33  void suppress(const std::vector<SiStripDigi>& in, std::vector<SiStripDigi>& selectedSignal, uint32_t detId);
35  void suppress(const std::vector<int16_t>& in, uint16_t firstAPV, edm::DetSet<SiStripDigi>& out);
36 
37  uint16_t truncate(int16_t adc) const {
38  if (adc > 253 && doTruncate && !doTruncate10bits)
39  return ((adc == 1023) ? 255 : 254);
40  return adc;
41  };
42 
43 private:
47 
48  uint16_t theFEDalgorithm;
49  bool isAValidDigi();
50 
51  bool doTruncate;
53  int16_t theFEDlowThresh;
55 
56  int16_t adc;
57  int16_t adcPrev;
58  int16_t adcNext;
59  int16_t adcMaxNeigh;
60  int16_t adcPrev2;
61  int16_t adcNext2;
62 
67 
70 
73 
74  // working caches
75  std::vector<int16_t> highThr_, lowThr_; // thresholds in adc counts
76  std::vector<float> highThrSN_, lowThrSN_; // thresholds as S/N
77  std::vector<float> noises_;
78 
79  void fillThresholds_(const uint32_t detID, size_t size);
80 };
81 #endif
size
Write out results.
void init(const edm::EventSetup &es)
uint16_t truncate(int16_t adc) const
void suppress(const std::vector< SiStripDigi > &in, std::vector< SiStripDigi > &selectedSignal, uint32_t detId, edm::ESHandle< SiStripNoises > &, edm::ESHandle< SiStripThreshold > &)
edm::ESHandle< SiStripNoises > noiseHandle
SiStripFedZeroSuppression(uint16_t fedalgo, bool trunc=true, bool trunc10bits=false)
void fillThresholds_(const uint32_t detID, size_t size)
edm::ESHandle< SiStripThreshold > thresholdHandle