Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 11 additions & 12 deletions DataFormats/SiStripCluster/interface/SiStripCluster.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,6 @@ class SiStripCluster {
amplitudes_.insert(amplitudes_.end(), begin, end);
}

/** The number of the first strip in the cluster.
* The high bit of firstStrip_ indicates whether the cluster is a candidate for being merged.
*/
uint16_t firstStrip() const { return firstStrip_ & stripIndexMask; }

uint16_t endStrip() const { return firstStrip() + size(); }

/** The amplitudes of the strips forming the cluster.
* The amplitudes are on consecutive strips; if a strip is missing
* the amplitude is set to zero.
Expand All @@ -58,15 +51,21 @@ class SiStripCluster {
* You can find the special meanings of values { 0, 254, 255} in section 3.4.1 of
* http://www.te.rl.ac.uk/esdg/cms-fed/firmware/Documents/FE_FPGA_Technical_Description.pdf
*/
uint8_t const* begin() const { return amplitudes_.data(); }
uint8_t const* end() const { return begin() + size(); }
uint8_t size() const { return amplitudes_.size(); }
uint8_t operator[](int i) const { return *(begin() + i); }
bool empty() const { return 0 == size(); }
auto size() const { return amplitudes_.size(); }
auto const* begin() const { return amplitudes_.data(); }
auto const* end() const { return begin() + size(); }
auto operator[](int i) const { return *(begin() + i); }
bool empty() const { return amplitudes_.empty(); }
bool full() const { return false; }

SiStripCluster const& amplitudes() const { return *this; }

/** The number of the first strip in the cluster.
* The high bit of firstStrip_ indicates whether the cluster is a candidate for being merged.
*/
uint16_t firstStrip() const { return firstStrip_ & stripIndexMask; }
uint16_t endStrip() const { return firstStrip() + size(); }

/** The barycenter of the cluster, not corrected for Lorentz shift;
* should not be used as position estimate for tracking.
*/
Expand Down