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 stripByStripAdd(State& state, uint16_t strip, uint8_t adc, output_t::TSFastFiller& out) const override {
22  if (candidateEnded(state, strip))
23  endCandidate(state, out);
24  addToCandidate(state, strip, adc);
25  }
26 
27  void stripByStripEnd(State& state, output_t::TSFastFiller& out) const override { endCandidate(state, out); }
28 
29 private:
30  template <class T>
31  void clusterizeDetUnit_(const T&, output_t::TSFastFiller&) const;
32 
34  float,
35  float,
36  unsigned,
37  unsigned,
38  unsigned,
40  bool removeApvShots,
41  float minGoodCharge);
42 
43  //constant methods with state information
44  uint16_t firstStrip(State const& state) const { return state.lastStrip - state.ADCs.size() + 1; }
45  bool candidateEnded(State const& state, const uint16_t&) const;
46  bool candidateAccepted(State const& state) const;
47 
48  //state modification methods
49  template <class T>
50  void endCandidate(State& state, T&) const;
51  void clearCandidate(State& state) const {
52  state.candidateLacksSeed = true;
53  state.noiseSquared = 0;
54  state.ADCs.clear();
55  }
56  void addToCandidate(State& state, const SiStripDigi& digi) const { addToCandidate(state, digi.strip(), digi.adc()); }
57  void addToCandidate(State& state, uint16_t strip, uint8_t adc) const;
58  void appendBadNeighbors(State& state) const;
59  void applyGains(State& state) const;
60 
65 };
66 
67 #endif
StripClusterizerAlgorithm
Definition: StripClusterizerAlgorithm.h:20
ecalMGPA::adc
constexpr int adc(sample_type sample)
get the ADC sample (12 bits)
Definition: EcalMGPASample.h:11
ThreeThresholdAlgorithm::MaxAdjacentBad
uint8_t MaxAdjacentBad
Definition: ThreeThresholdAlgorithm.h:62
StripClusterizerAlgorithm::State::candidateLacksSeed
bool candidateLacksSeed
Definition: StripClusterizerAlgorithm.h:50
SiStripApvShotCleaner.h
StripClusterizerAlgorithm::qualityLabel
std::string qualityLabel
Definition: StripClusterizerAlgorithm.h:94
ThreeThresholdAlgorithm::addToCandidate
void addToCandidate(State &state, const SiStripDigi &digi) const
Definition: ThreeThresholdAlgorithm.h:56
ThreeThresholdAlgorithm::candidateAccepted
bool candidateAccepted(State const &state) const
Definition: ThreeThresholdAlgorithm.cc:96
ThreeThresholdAlgorithm::endCandidate
void endCandidate(State &state, T &) const
Definition: ThreeThresholdAlgorithm.cc:86
hcaldqm::flag::State
State
Definition: Flag.h:13
ThreeThresholdAlgorithm::candidateEnded
bool candidateEnded(State const &state, const uint16_t &) const
Definition: ThreeThresholdAlgorithm.cc:59
edm::DetSet< SiStripDigi >
digitizers_cfi.strip
strip
Definition: digitizers_cfi.py:19
ThreeThresholdAlgorithm::minGoodCharge
float minGoodCharge
Definition: ThreeThresholdAlgorithm.h:64
edmNew::DetSetVector::TSFastFiller
Definition: DetSetVectorNew.h:334
ThreeThresholdAlgorithm::appendBadNeighbors
void appendBadNeighbors(State &state) const
Definition: ThreeThresholdAlgorithm.cc:115
ThreeThresholdAlgorithm::stripByStripAdd
void stripByStripAdd(State &state, uint16_t strip, uint8_t adc, output_t::TSFastFiller &out) const override
Definition: ThreeThresholdAlgorithm.h:21
ThreeThresholdAlgorithm::ThreeThresholdAlgorithm
ThreeThresholdAlgorithm(float, float, float, unsigned, unsigned, unsigned, std::string qualityLabel, bool removeApvShots, float minGoodCharge)
Definition: ThreeThresholdAlgorithm.cc:10
StripClusterizerAlgorithm::State::lastStrip
uint16_t lastStrip
Definition: StripClusterizerAlgorithm.h:48
ThreeThresholdAlgorithm::ClusterThresholdSquared
float ClusterThresholdSquared
Definition: ThreeThresholdAlgorithm.h:61
StripClusterizerAlgorithm::State
Definition: StripClusterizerAlgorithm.h:44
ThreeThresholdAlgorithm::stripByStripEnd
void stripByStripEnd(State &state, std::vector< SiStripCluster > &out) const override
Definition: ThreeThresholdAlgorithm.cc:148
ThreeThresholdAlgorithm::firstStrip
uint16_t firstStrip(State const &state) const
Definition: ThreeThresholdAlgorithm.h:44
ThreeThresholdAlgorithm::clusterizeDetUnit
void clusterizeDetUnit(const edm::DetSet< SiStripDigi > &, output_t::TSFastFiller &) const override
Definition: ThreeThresholdAlgorithm.cc:128
StripClusterizerAlgorithm::State::ADCs
std::vector< uint8_t > ADCs
Definition: StripClusterizerAlgorithm.h:47
ThreeThresholdAlgorithm::SeedThreshold
float SeedThreshold
Definition: ThreeThresholdAlgorithm.h:61
StripClusterizerAlgorithm::State::noiseSquared
float noiseSquared
Definition: StripClusterizerAlgorithm.h:49
StripClusterizerAlgorithm::Det
Definition: StripClusterizerAlgorithm.h:25
SiStripDigi::adc
const uint16_t & adc() const
Definition: SiStripDigi.h:34
edmNew::DetSet
Definition: DetSetNew.h:22
ThreeThresholdAlgorithm::applyGains
void applyGains(State &state) const
Definition: ThreeThresholdAlgorithm.cc:102
ThreeThresholdAlgorithm::stripByStripEnd
void stripByStripEnd(State &state, output_t::TSFastFiller &out) const override
Definition: ThreeThresholdAlgorithm.h:27
ThreeThresholdAlgorithm::stripByStripAdd
void stripByStripAdd(State &state, uint16_t strip, uint8_t adc, std::vector< SiStripCluster > &out) const override
Definition: ThreeThresholdAlgorithm.cc:139
ThreeThresholdAlgorithm::RemoveApvShots
bool RemoveApvShots
Definition: ThreeThresholdAlgorithm.h:63
ThreeThresholdAlgorithm::MaxSequentialBad
uint8_t MaxSequentialBad
Definition: ThreeThresholdAlgorithm.h:62
ThreeThresholdAlgorithm::clusterizeDetUnit_
void clusterizeDetUnit_(const T &, output_t::TSFastFiller &) const
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
ThreeThresholdAlgorithm::clearCandidate
void clearCandidate(State &state) const
Definition: ThreeThresholdAlgorithm.h:51
SiStripDigi::strip
const uint16_t & strip() const
Definition: SiStripDigi.h:33
State
State
Definition: RPixErrorChecker.h:15
ThreeThresholdAlgorithm::stripByStripBegin
Det stripByStripBegin(uint32_t id) const override
Definition: ThreeThresholdAlgorithm.cc:137
Det
GeometricSearchDet Det
Definition: DetBelowR.h:8
ThreeThresholdAlgorithm::ChannelThreshold
float ChannelThreshold
Definition: ThreeThresholdAlgorithm.h:61
edmNew::DetSetVector::TSFastFiller
friend class TSFastFiller
Definition: DetSetVectorNew.h:411
T
long double T
Definition: Basic3DVectorLD.h:48
ThreeThresholdAlgorithm::MaxSequentialHoles
uint8_t MaxSequentialHoles
Definition: ThreeThresholdAlgorithm.h:62
ThreeThresholdAlgorithm
Definition: ThreeThresholdAlgorithm.h:6
StripClusterizerAlgorithmFactory
Definition: StripClusterizerAlgorithmFactory.h:10
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
SiStripDigi
A Digi for the silicon strip detector, containing both strip and adc information, and suitable for st...
Definition: SiStripDigi.h:12
StripClusterizerAlgorithm.h