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
SiStripFedZeroSuppression::theNextFEDlowThresh
int16_t theNextFEDlowThresh
Definition: SiStripFedZeroSuppression.h:65
MessageLogger.h
SiStripFedZeroSuppression::doTruncate10bits
bool doTruncate10bits
Definition: SiStripFedZeroSuppression.h:52
ESHandle.h
SiStripNoises
Definition: SiStripNoises.h:25
edm::DetSet
Definition: DetSet.h:23
SiStripFedZeroSuppression::theFEDlowThresh
int16_t theFEDlowThresh
Definition: SiStripFedZeroSuppression.h:53
SiStripRawProcessingFactory
Definition: SiStripRawProcessingFactory.h:14
SiStripFedZeroSuppression::doTruncate
bool doTruncate
Definition: SiStripFedZeroSuppression.h:51
SiStripFedZeroSuppression::highThr_
std::vector< int16_t > highThr_
Definition: SiStripFedZeroSuppression.h:75
SiStripFedZeroSuppression::theFEDalgorithm
uint16_t theFEDalgorithm
Definition: SiStripFedZeroSuppression.h:48
SiStripRawDigi.h
SiStripFedZeroSuppression::theNext2FEDlowThresh
int16_t theNext2FEDlowThresh
Definition: SiStripFedZeroSuppression.h:72
SiStripFedZeroSuppression::adcPrev2
int16_t adcPrev2
Definition: SiStripFedZeroSuppression.h:60
SiStripFedZeroSuppression::theNeighFEDlowThresh
int16_t theNeighFEDlowThresh
Definition: SiStripFedZeroSuppression.h:68
SiStripFedZeroSuppression::lowThrSN_
std::vector< float > lowThrSN_
Definition: SiStripFedZeroSuppression.h:76
SiStripFedZeroSuppression::suppress
void suppress(const std::vector< SiStripDigi > &in, std::vector< SiStripDigi > &selectedSignal, uint32_t detId, edm::ESHandle< SiStripNoises > &, edm::ESHandle< SiStripThreshold > &)
Definition: SiStripFedZeroSuppression.cc:32
SiStripFedZeroSuppression::adcMaxNeigh
int16_t adcMaxNeigh
Definition: SiStripFedZeroSuppression.h:59
SiStripFedZeroSuppression::noiseHandle
edm::ESHandle< SiStripNoises > noiseHandle
Definition: SiStripFedZeroSuppression.h:41
SiStripFedZeroSuppression::threshold_cache_id
uint32_t threshold_cache_id
Definition: SiStripFedZeroSuppression.h:46
SiStripFedZeroSuppression::~SiStripFedZeroSuppression
~SiStripFedZeroSuppression()
Definition: SiStripFedZeroSuppression.h:26
SiStripFedZeroSuppression::adcPrev
int16_t adcPrev
Definition: SiStripFedZeroSuppression.h:57
SiStripFedZeroSuppression::isAValidDigi
bool isAValidDigi()
Definition: SiStripFedZeroSuppression.cc:374
SiStripDigi.h
SiStripFedZeroSuppression
Definition: SiStripFedZeroSuppression.h:16
edm::ESHandle< SiStripNoises >
SiStripFedZeroSuppression::noises_
std::vector< float > noises_
Definition: SiStripFedZeroSuppression.h:77
SiStripFedZeroSuppression::highThrSN_
std::vector< float > highThrSN_
Definition: SiStripFedZeroSuppression.h:76
SiStripFedZeroSuppression::adc
int16_t adc
Definition: SiStripFedZeroSuppression.h:56
SiStripFedZeroSuppression::thePrevFEDhighThresh
int16_t thePrevFEDhighThresh
Definition: SiStripFedZeroSuppression.h:64
SiStripFedZeroSuppression::adcNext2
int16_t adcNext2
Definition: SiStripFedZeroSuppression.h:61
recoMuon::in
Definition: RecoMuonEnumerators.h:6
SiStripFedZeroSuppression::noise_cache_id
uint32_t noise_cache_id
Definition: SiStripFedZeroSuppression.h:46
edm::EventSetup
Definition: EventSetup.h:57
DetSetVector.h
SiStripFedZeroSuppression::thresholdHandle
edm::ESHandle< SiStripThreshold > thresholdHandle
Definition: SiStripFedZeroSuppression.h:45
SiStripFedZeroSuppression::lowThr_
std::vector< int16_t > lowThr_
Definition: SiStripFedZeroSuppression.h:75
SiStripThreshold
Definition: __init__.py:1
SiStripFedZeroSuppression::thePrev2FEDlowThresh
int16_t thePrev2FEDlowThresh
Definition: SiStripFedZeroSuppression.h:71
SiStripFedZeroSuppression::theFEDhighThresh
int16_t theFEDhighThresh
Definition: SiStripFedZeroSuppression.h:54
SiStripFedZeroSuppression::init
void init(const edm::EventSetup &es)
Definition: SiStripFedZeroSuppression.cc:12
SiStripFedZeroSuppression::fillThresholds_
void fillThresholds_(const uint32_t detID, size_t size)
Definition: SiStripFedZeroSuppression.cc:238
SiStripFedZeroSuppression::theNeighFEDhighThresh
int16_t theNeighFEDhighThresh
Definition: SiStripFedZeroSuppression.h:69
EventSetup.h
SiStripFedZeroSuppression::theNextFEDhighThresh
int16_t theNextFEDhighThresh
Definition: SiStripFedZeroSuppression.h:66
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
SiStripFedZeroSuppression::thePrevFEDlowThresh
int16_t thePrevFEDlowThresh
Definition: SiStripFedZeroSuppression.h:63
pileupReCalc_HLTpaths.trunc
trunc
Definition: pileupReCalc_HLTpaths.py:144
SiStripFedZeroSuppression::SiStripFedZeroSuppression
SiStripFedZeroSuppression(uint16_t fedalgo, bool trunc=true, bool trunc10bits=false)
Definition: SiStripFedZeroSuppression.h:20
SiStripFedZeroSuppression::adcNext
int16_t adcNext
Definition: SiStripFedZeroSuppression.h:58
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443
SiStripFedZeroSuppression::truncate
uint16_t truncate(int16_t adc) const
Definition: SiStripFedZeroSuppression.h:37