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
StripClusterizerAlgorithm::clusterizeDetUnit
virtual void clusterizeDetUnit(const edm::DetSet< SiStripDigi > &, output_t::TSFastFiller &) const
Definition: StripClusterizerAlgorithm.h:42
edm::DetSetVector< SiStripDigi >
StripClusterizerAlgorithm
Definition: StripClusterizerAlgorithm.h:16
StripClusterizerAlgorithm::StripClusterizerAlgorithm
StripClusterizerAlgorithm(const edm::ESGetToken< SiStripClusterizerConditions, SiStripClusterizerConditionsRcd > &conditionsToken)
Definition: StripClusterizerAlgorithm.h:60
input
static const std::string input
Definition: EdmProvDump.cc:48
StripClusterizerAlgorithm::State::candidateLacksSeed
bool candidateLacksSeed
Definition: StripClusterizerAlgorithm.h:27
StripClusterizerAlgorithm::clusterize_
void clusterize_(const T &input, output_t &output) const
Definition: StripClusterizerAlgorithm.h:66
StripClusterizerAlgorithm::State::det
Det const & det() const
Definition: StripClusterizerAlgorithm.h:23
edm::DetSet< SiStripDigi >
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:72
edm
HLT enums.
Definition: AlignableModifier.h:19
gpuClustering::adc
uint16_t *__restrict__ uint16_t const *__restrict__ adc
Definition: gpuClusterChargeCut.h:20
digitizers_cfi.strip
strip
Definition: digitizers_cfi.py:19
StripClusterizerAlgorithm::State::State
State(Det const &idet)
Definition: StripClusterizerAlgorithm.h:22
StripClusterizerAlgorithm::m_conditionsToken
edm::ESGetToken< SiStripClusterizerConditions, SiStripClusterizerConditionsRcd > m_conditionsToken
Definition: StripClusterizerAlgorithm.h:75
edmNew::DetSetVector::TSFastFiller
Definition: DetSetVectorNew.h:300
StripClusterizerAlgorithm::initialize
void initialize(const edm::EventSetup &es)
Definition: StripClusterizerAlgorithm.h:35
StripClusterizerAlgorithm::stripByStripEnd
virtual void stripByStripEnd(State &state, output_t::TSFastFiller &out) const
Definition: StripClusterizerAlgorithm.h:52
SiStripClusterizerConditions
Definition: SiStripClusterizerConditions.h:11
SiStripClusterizerConditions::findDetId
Det const & findDetId(const uint32_t id) const
Definition: SiStripClusterizerConditions.h:43
StripClusterizerAlgorithm::State::m_det
Det const & m_det
Definition: StripClusterizerAlgorithm.h:30
StripClusterizerAlgorithm::State::lastStrip
uint16_t lastStrip
Definition: StripClusterizerAlgorithm.h:25
StripClusterizerAlgorithm::State
Definition: StripClusterizerAlgorithm.h:21
StripClusterizerAlgorithm::output_t
edmNew::DetSetVector< SiStripCluster > output_t
Definition: StripClusterizerAlgorithm.h:39
StripClusterizerAlgorithm::State::ADCs
std::vector< uint8_t > ADCs
Definition: StripClusterizerAlgorithm.h:24
StripClusterizerAlgorithm::State::noiseSquared
float noiseSquared
Definition: StripClusterizerAlgorithm.h:26
alignCSCRings.ff
ff
Definition: alignCSCRings.py:148
edmNew::DetSet
Definition: DetSetNew.h:22
StripClusterizerAlgorithm::clusterizeDetUnit
virtual void clusterizeDetUnit(const edmNew::DetSet< SiStripDigi > &, output_t::TSFastFiller &) const
Definition: StripClusterizerAlgorithm.h:43
SiStripClusterizerConditions.h
StripClusterizerAlgorithm::conditions
const SiStripClusterizerConditions & conditions() const
Definition: StripClusterizerAlgorithm.h:36
SiStripCluster.h
StripClusterizerAlgorithm::clusterize
void clusterize(const edm::DetSetVector< SiStripDigi > &, output_t &) const
Definition: StripClusterizerAlgorithm.cc:12
StripClusterizerAlgorithm::InvalidChargeException
Definition: StripClusterizerAlgorithm.h:54
edm::EventSetup
Definition: EventSetup.h:58
DetSetVector.h
StripClusterizerAlgorithm::m_conditions
const SiStripClusterizerConditions * m_conditions
Definition: StripClusterizerAlgorithm.h:76
edm::ESGetToken< SiStripClusterizerConditions, SiStripClusterizerConditionsRcd >
Det
GeometricSearchDet Det
Definition: DetBelowR.h:8
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:127
edmNew::DetSetVector
Definition: DetSetNew.h:13
StripClusterizerAlgorithm::stripByStripAdd
virtual void stripByStripAdd(State &state, uint16_t strip, uint8_t adc, std::vector< SiStripCluster > &out) const
Definition: StripClusterizerAlgorithm.h:48
RunInfoPI::state
state
Definition: RunInfoPayloadInspectoHelper.h:16
T
long double T
Definition: Basic3DVectorLD.h:48
StripClusterizerAlgorithm::~StripClusterizerAlgorithm
virtual ~StripClusterizerAlgorithm()
Definition: StripClusterizerAlgorithm.h:33
SiStripClusterizerConditions::Det
Definition: SiStripClusterizerConditions.h:15
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
cms::Exception
Definition: Exception.h:70
EventSetup
StripClusterizerAlgorithm::stripByStripEnd
virtual void stripByStripEnd(State &state, std::vector< SiStripCluster > &out) const
Definition: StripClusterizerAlgorithm.h:49
StripClusterizerAlgorithm::stripByStripAdd
virtual void stripByStripAdd(State &state, uint16_t strip, uint8_t adc, output_t::TSFastFiller &out) const
Definition: StripClusterizerAlgorithm.h:51
StripClusterizerAlgorithm::stripByStripBegin
Det const & stripByStripBegin(uint32_t id) const
Definition: StripClusterizerAlgorithm.h:46
DetSetVectorNew.h
StripClusterizerAlgorithm::InvalidChargeException::InvalidChargeException
InvalidChargeException(const SiStripDigi &)
Definition: StripClusterizerAlgorithm.cc:19
SiStripClusterizerConditionsRcd.h