CMS 3D CMS Logo

StripClusterizerAlgorithm.h
Go to the documentation of this file.
1 #ifndef RecoLocalTracker_StripClusterizerAlgorithm_h
2 #define RecoLocalTracker_StripClusterizerAlgorithm_h
3 
4 namespace edm {
5  class EventSetup;
6 }
7 class SiStripDigi;
11 #include <limits>
12 
15 
17 public:
19 
20  //state of the candidate cluster
21  struct State {
22  State(Det const& idet) : m_det(idet) { ADCs.reserve(8); }
23  Det const& det() const { return m_det; }
24  std::vector<uint8_t> ADCs;
25  uint16_t lastStrip = 0;
26  float noiseSquared = 0;
27  bool candidateLacksSeed = true;
28 
29  private:
30  Det const& m_det;
31  };
32 
34 
37 
38  //Offline DetSet interface
44 
45  //HLT stripByStrip interface
46  Det const& stripByStripBegin(uint32_t id) const { return m_conditions->findDetId(id); }
47 
48  virtual void stripByStripAdd(State& state, uint16_t strip, uint8_t adc, std::vector<SiStripCluster>& out) const {}
49  virtual void stripByStripEnd(State& state, std::vector<SiStripCluster>& out) const {}
50 
51  virtual void stripByStripAdd(State& state, uint16_t strip, uint8_t adc, output_t::TSFastFiller& out) const {}
53 
55  public:
57  };
58 
59 protected:
62  : m_conditionsToken(conditionsToken) {}
63 
64 private:
65  template <class T>
66  void clusterize_(const T& input, output_t& output) const {
67  for (typename T::const_iterator it = input.begin(); it != input.end(); it++) {
68  output_t::TSFastFiller ff(output, it->detId());
69  clusterizeDetUnit(*it, ff);
70  if (ff.empty())
71  ff.abort();
72  }
73  }
74 
77 };
78 #endif
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
virtual void stripByStripAdd(State &state, uint16_t strip, uint8_t adc, output_t::TSFastFiller &out) const
Det const & stripByStripBegin(uint32_t id) const
void initialize(const edm::EventSetup &es)
const SiStripClusterizerConditions * m_conditions
GeometricSearchDet Det
Definition: DetBelowR.h:8
virtual void stripByStripEnd(State &state, output_t::TSFastFiller &out) const
virtual void clusterizeDetUnit(const edmNew::DetSet< SiStripDigi > &, output_t::TSFastFiller &) const
void clusterize_(const T &input, output_t &output) const
const SiStripClusterizerConditions & conditions() const
static std::string const input
Definition: EdmProvDump.cc:50
edm::ESGetToken< SiStripClusterizerConditions, SiStripClusterizerConditionsRcd > m_conditionsToken
virtual void stripByStripAdd(State &state, uint16_t strip, uint8_t adc, std::vector< SiStripCluster > &out) const
Det const & findDetId(const uint32_t id) const
edmNew::DetSetVector< SiStripCluster > output_t
virtual void clusterizeDetUnit(const edm::DetSet< SiStripDigi > &, output_t::TSFastFiller &) const
A Digi for the silicon strip detector, containing both strip and adc information, and suitable for st...
Definition: SiStripDigi.h:12
void clusterize(const edm::DetSetVector< SiStripDigi > &, output_t &) const
HLT enums.
Definition: output.py:1
virtual void stripByStripEnd(State &state, std::vector< SiStripCluster > &out) const
long double T
StripClusterizerAlgorithm(const edm::ESGetToken< SiStripClusterizerConditions, SiStripClusterizerConditionsRcd > &conditionsToken)
uint16_t *__restrict__ uint16_t const *__restrict__ adc