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 
16 
18 
20 
21  public:
22 
23  SiStripFedZeroSuppression(uint16_t fedalgo, bool trunc=true, bool trunc10bits=false):
24  noise_cache_id(0),
26  theFEDalgorithm(fedalgo),
28  doTruncate10bits(trunc10bits){}
30  void init(const edm::EventSetup& es);
31  void suppress(const std::vector<SiStripDigi>& in, std::vector<SiStripDigi>& selectedSignal, 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 ) return ((adc==1023) ? 255 : 254);
39  return adc;
40  };
41 
42  private:
43 
44 
48 
49  uint16_t theFEDalgorithm;
50  bool isAValidDigi();
51 
52  bool doTruncate;
54  int16_t theFEDlowThresh;
56 
57  int16_t adc;
58  int16_t adcPrev;
59  int16_t adcNext;
60  int16_t adcMaxNeigh;
61  int16_t adcPrev2;
62  int16_t adcNext2;
63 
68 
71 
74 
75  // working caches
76  std::vector<int16_t> highThr_, lowThr_; // thresholds in adc counts
77  std::vector<float> highThrSN_, lowThrSN_; // thresholds as S/N
78  std::vector<float> noises_;
79 
80  void fillThresholds_(const uint32_t detID, size_t size) ;
81 
82 };
83 #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