CMS 3D CMS Logo

ThreeThresholdAlgorithm.h
Go to the documentation of this file.
1 #ifndef RecoLocalTracker_SiStripClusterizer_ThreeThresholdAlgorithm_h
2 #define RecoLocalTracker_SiStripClusterizer_ThreeThresholdAlgorithm_h
5 
8 
9 public:
14 
15  Det stripByStripBegin(uint32_t id) const override;
16 
17  // LazyGetter interface
18  void stripByStripAdd(State& state, uint16_t strip, uint8_t adc, std::vector<SiStripCluster>& out) const override;
19  void stripByStripEnd(State& state, std::vector<SiStripCluster>& out) const override;
20 
21  void addFed(State& state,
23  uint16_t ipair,
24  std::vector<SiStripCluster>& out) const {
25  while (unpacker.hasData()) {
26  stripByStripAdd(state, unpacker.sampleNumber() + ipair * 256, unpacker.adc(), out);
27  unpacker++;
28  }
29  }
31  // detset interface
32  void addFed(State& state,
34  uint16_t ipair,
35  output_t::TSFastFiller& out) const override {
36  while (unpacker.hasData()) {
37  stripByStripAdd(state, unpacker.sampleNumber() + ipair * 256, unpacker.adc(), out);
38  unpacker++;
39  }
40  }
41 
42  void stripByStripAdd(State& state, uint16_t strip, uint8_t adc, output_t::TSFastFiller& out) const override {
43  if (candidateEnded(state, strip))
44  endCandidate(state, out);
45  addToCandidate(state, strip, adc);
46  }
47 
48  void stripByStripEnd(State& state, output_t::TSFastFiller& out) const override { endCandidate(state, out); }
49 
50 private:
51  template <class T>
52  void clusterizeDetUnit_(const T&, output_t::TSFastFiller&) const;
53 
55  float,
56  float,
57  unsigned,
58  unsigned,
59  unsigned,
61  bool removeApvShots,
62  float minGoodCharge);
63 
64  //constant methods with state information
65  uint16_t firstStrip(State const& state) const { return state.lastStrip - state.ADCs.size() + 1; }
66  bool candidateEnded(State const& state, const uint16_t&) const;
67  bool candidateAccepted(State const& state) const;
68 
69  //state modification methods
70  template <class T>
71  void endCandidate(State& state, T&) const;
72  void clearCandidate(State& state) const {
73  state.candidateLacksSeed = true;
74  state.noiseSquared = 0;
75  state.ADCs.clear();
76  }
77  void addToCandidate(State& state, const SiStripDigi& digi) const { addToCandidate(state, digi.strip(), digi.adc()); }
78  void addToCandidate(State& state, uint16_t strip, uint8_t adc) const;
79  void appendBadNeighbors(State& state) const;
80  void applyGains(State& state) const;
81 
86 };
87 
88 #endif
ThreeThresholdAlgorithm(float, float, float, unsigned, unsigned, unsigned, std::string qualityLabel, bool removeApvShots, float minGoodCharge)
void addFed(State &state, sistrip::FEDZSChannelUnpacker &unpacker, uint16_t ipair, std::vector< SiStripCluster > &out) const
void clusterizeDetUnit(const edm::DetSet< SiStripDigi > &, output_t::TSFastFiller &) const override
GeometricSearchDet Det
Definition: DetBelowR.h:8
bool candidateAccepted(State const &state) const
Det stripByStripBegin(uint32_t id) const override
void endCandidate(State &state, T &) const
virtual void addFed(Det const &det, sistrip::FEDZSChannelUnpacker &unpacker, uint16_t ipair, std::vector< SiStripCluster > &out) const
void clearCandidate(State &state) const
void appendBadNeighbors(State &state) const
void stripByStripEnd(State &state, std::vector< SiStripCluster > &out) const override
const uint16_t & strip() const
Definition: SiStripDigi.h:33
constexpr int adc(sample_type sample)
get the ADC sample (12 bits)
A Digi for the silicon strip detector, containing both strip and adc information, and suitable for st...
Definition: SiStripDigi.h:12
bool candidateEnded(State const &state, const uint16_t &) const
void addToCandidate(State &state, const SiStripDigi &digi) const
void stripByStripAdd(State &state, uint16_t strip, uint8_t adc, output_t::TSFastFiller &out) const override
void stripByStripAdd(State &state, uint16_t strip, uint8_t adc, std::vector< SiStripCluster > &out) const override
void applyGains(State &state) const
void stripByStripEnd(State &state, output_t::TSFastFiller &out) const override
const uint16_t & adc() const
Definition: SiStripDigi.h:34
long double T
uint16_t firstStrip(State const &state) const
void addFed(State &state, sistrip::FEDZSChannelUnpacker &unpacker, uint16_t ipair, output_t::TSFastFiller &out) const override
void clusterizeDetUnit_(const T &, output_t::TSFastFiller &) const