CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
16 
18 
20 
21  public:
22 
23  SiStripFedZeroSuppression(uint16_t fedalgo, bool trunc=true):
24  noise_cache_id(0),
26  theFEDalgorithm(fedalgo),
27  doTruncate(trunc) {}
29  void init(const edm::EventSetup& es);
30  void suppress(const std::vector<SiStripDigi>&,std::vector<SiStripDigi>&,const uint32_t&,
32  void suppress(const std::vector<SiStripDigi>&,std::vector<SiStripDigi>&,const uint32_t&);
34  void suppress(const std::vector<int16_t>&,const uint16_t&, edm::DetSet<SiStripDigi>&);
35 
36  bool IsAValidDigi();
37 
38  private:
39 
40  inline uint16_t truncate(int16_t adc) const{
41  if(adc>253 && doTruncate) return ((adc==1023) ? 255 : 254);
42  return adc;
43  };
44 
48 
49  uint16_t theFEDalgorithm;
50  bool doTruncate;
51 
52  int16_t theFEDlowThresh;
54 
55  int16_t adc;
56  int16_t adcPrev;
57  int16_t adcNext;
58  int16_t adcMaxNeigh;
59  int16_t adcPrev2;
60  int16_t adcNext2;
61 
66 
69 
72 
73  // working caches
74  std::vector<int16_t> highThr_, lowThr_; // thresholds in adc counts
75  std::vector<float> highThrSN_, lowThrSN_; // thresholds as S/N
76  std::vector<float> noises_;
77 
78  void fillThresholds_(const uint32_t detID, size_t size) ;
79 
80 };
81 #endif
void init(const edm::EventSetup &es)
uint16_t truncate(int16_t adc) const
SiStripFedZeroSuppression(uint16_t fedalgo, bool trunc=true)
edm::ESHandle< SiStripNoises > noiseHandle
void suppress(const std::vector< SiStripDigi > &, std::vector< SiStripDigi > &, const uint32_t &, edm::ESHandle< SiStripNoises > &, edm::ESHandle< SiStripThreshold > &)
void fillThresholds_(const uint32_t detID, size_t size)
tuple size
Write out results.
edm::ESHandle< SiStripThreshold > thresholdHandle