CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Private Attributes
MTDArrayBuffer Class Reference

Class to store ADC counts and times during clustering. More...

#include <MTDArrayBuffer.h>

Public Types

typedef unsigned int uint
 

Public Member Functions

void add_energy (uint row, uint col, float energy)
 
void clear (uint row, uint col)
 
void clear (const FTLCluster::FTLHitPos &pos)
 
uint columns () const
 
float energy (uint row, uint col) const
 
float energy (const FTLCluster::FTLHitPos &) const
 
GlobalPoint global_point (uint row, uint col) const
 
GlobalPoint global_point (const FTLCluster::FTLHitPos &) const
 
uint index (uint row, uint col) const
 Definition of indexing within the buffer. More...
 
uint index (const FTLCluster::FTLHitPos &pix) const
 
bool inside (uint row, uint col) const
 
LocalError local_error (uint row, uint col) const
 
LocalError local_error (const FTLCluster::FTLHitPos &) const
 
 MTDArrayBuffer (uint rows, uint cols)
 
 MTDArrayBuffer ()
 
uint rows () const
 
void set (uint row, uint col, GeomDetEnumerators::Location subDet, float energy, float time, float time_error, const LocalError &local_error, const GlobalPoint &global_point)
 
void set (const FTLCluster::FTLHitPos &, GeomDetEnumerators::Location subDet, float energy, float time, float time_error, const LocalError &local_error, const GlobalPoint &global_point)
 
void set_energy (uint row, uint col, float energy)
 
void set_energy (const FTLCluster::FTLHitPos &, float energy)
 
void set_global_point (uint row, uint col, const GlobalPoint &gp)
 
void set_global_point (const FTLCluster::FTLHitPos &, const GlobalPoint &gp)
 
void set_local_error (uint row, uint col, const LocalError &le)
 
void set_local_error (const FTLCluster::FTLHitPos &, const LocalError &le)
 
void set_subDet (uint row, uint col, GeomDetEnumerators::Location subDet)
 
void set_subDet (const FTLCluster::FTLHitPos &, GeomDetEnumerators::Location subDet)
 
void set_time (uint row, uint col, float time)
 
void set_time (const FTLCluster::FTLHitPos &, float time)
 
void set_time_error (uint row, uint col, float time_error)
 
void set_time_error (const FTLCluster::FTLHitPos &, float time_error)
 
void setSize (uint rows, uint cols)
 
uint size () const
 
GeomDetEnumerators::Location subDet (uint row, uint col) const
 Use subDet to identify whether the Hit is in BTL or ETL. More...
 
GeomDetEnumerators::Location subDet (const FTLCluster::FTLHitPos &) const
 
float time (uint row, uint col) const
 
float time (const FTLCluster::FTLHitPos &) const
 
float time_error (uint row, uint col) const
 
float time_error (const FTLCluster::FTLHitPos &) const
 

Private Attributes

std::vector< float > hitEnergy_vec
 
std::vector< GlobalPointhitGP_vec
 
std::vector< LocalErrorhitLE_vec
 
std::vector
< GeomDetEnumerators::Location
hitSubDet_vec
 
std::vector< float > hitTime_vec
 
std::vector< float > hitTimeError_vec
 
uint ncols
 
uint nrows
 

Detailed Description

Class to store ADC counts and times during clustering.

Definition at line 20 of file MTDArrayBuffer.h.

Member Typedef Documentation

typedef unsigned int MTDArrayBuffer::uint

Definition at line 22 of file MTDArrayBuffer.h.

Constructor & Destructor Documentation

MTDArrayBuffer::MTDArrayBuffer ( uint  rows,
uint  cols 
)
inline

Definition at line 113 of file MTDArrayBuffer.h.

115  hitEnergy_vec(rows * cols, 0),
116  hitTime_vec(rows * cols, 0),
117  hitTimeError_vec(rows * cols, 0),
118  hitGP_vec(rows * cols),
119  hitLE_vec(rows * cols),
120  nrows(rows),
121  ncols(cols) {}
std::vector< GlobalPoint > hitGP_vec
uint rows() const
std::vector< float > hitEnergy_vec
std::vector< GeomDetEnumerators::Location > hitSubDet_vec
std::vector< float > hitTime_vec
std::vector< float > hitTimeError_vec
std::vector< LocalError > hitLE_vec
MTDArrayBuffer::MTDArrayBuffer ( )
inline

Definition at line 25 of file MTDArrayBuffer.h.

25 {}

Member Function Documentation

void MTDArrayBuffer::add_energy ( uint  row,
uint  col,
float  energy 
)
inline

Definition at line 190 of file MTDArrayBuffer.h.

References energy(), hitEnergy_vec, and index().

190 { hitEnergy_vec[index(row, col)] += energy; }
std::vector< float > hitEnergy_vec
float energy(uint row, uint col) const
uint index(uint row, uint col) const
Definition of indexing within the buffer.
int col
Definition: cuy.py:1009
void MTDArrayBuffer::clear ( uint  row,
uint  col 
)
inline

Definition at line 49 of file MTDArrayBuffer.h.

References GeomDetEnumerators::invalidLoc, set_energy(), set_global_point(), set_local_error(), set_subDet(), set_time(), and set_time_error().

Referenced by MTDThresholdClusterizer::clear_buffer(), and MTDThresholdClusterizer::make_cluster().

49  {
50  LocalError le_n(0, 0, 0);
51  GlobalPoint gp_n(0, 0, 0);
53  set_energy(row, col, 0.);
54  set_time(row, col, 0.);
55  set_time_error(row, col, 0.);
56  set_local_error(row, col, le_n);
57  set_global_point(row, col, gp_n);
58  }
void set_energy(uint row, uint col, float energy)
void set_local_error(uint row, uint col, const LocalError &le)
void set_time(uint row, uint col, float time)
void set_subDet(uint row, uint col, GeomDetEnumerators::Location subDet)
void set_global_point(uint row, uint col, const GlobalPoint &gp)
int col
Definition: cuy.py:1009
void set_time_error(uint row, uint col, float time_error)
void MTDArrayBuffer::clear ( const FTLCluster::FTLHitPos pos)
inline

Definition at line 59 of file MTDArrayBuffer.h.

References clear(), FTLCluster::FTLHitPos::col(), and FTLCluster::FTLHitPos::row().

Referenced by clear().

59 { clear(pos.row(), pos.col()); }
constexpr int row() const
Definition: FTLCluster.h:61
constexpr int col() const
Definition: FTLCluster.h:62
void clear(uint row, uint col)
uint MTDArrayBuffer::columns ( ) const
inline

Definition at line 45 of file MTDArrayBuffer.h.

References ncols.

Referenced by MTDThresholdClusterizer::make_cluster(), and MTDThresholdClusterizer::setup().

45 { return ncols; }
float MTDArrayBuffer::energy ( uint  row,
uint  col 
) const
inline

Definition at line 141 of file MTDArrayBuffer.h.

References hitEnergy_vec, and index().

Referenced by add_energy(), MTDThresholdClusterizer::clusterize(), MTDThresholdClusterizer::make_cluster(), Jet.Jet::rawEnergy(), set(), and set_energy().

141 { return hitEnergy_vec[index(row, col)]; }
std::vector< float > hitEnergy_vec
uint index(uint row, uint col) const
Definition of indexing within the buffer.
int col
Definition: cuy.py:1009
float MTDArrayBuffer::energy ( const FTLCluster::FTLHitPos pix) const
inline

Definition at line 142 of file MTDArrayBuffer.h.

References hitEnergy_vec, and index().

Referenced by Jet.Jet::rawEnergy().

142 { return hitEnergy_vec[index(pix)]; }
std::vector< float > hitEnergy_vec
uint index(uint row, uint col) const
Definition of indexing within the buffer.
GlobalPoint MTDArrayBuffer::global_point ( uint  row,
uint  col 
) const
inline

Definition at line 153 of file MTDArrayBuffer.h.

References hitGP_vec, and index().

Referenced by MTDThresholdClusterizer::make_cluster(), and set().

153 { return hitGP_vec[index(row, col)]; }
std::vector< GlobalPoint > hitGP_vec
uint index(uint row, uint col) const
Definition of indexing within the buffer.
int col
Definition: cuy.py:1009
GlobalPoint MTDArrayBuffer::global_point ( const FTLCluster::FTLHitPos pix) const
inline

Definition at line 154 of file MTDArrayBuffer.h.

References hitGP_vec, and index().

154 { return hitGP_vec[index(pix)]; }
std::vector< GlobalPoint > hitGP_vec
uint index(uint row, uint col) const
Definition of indexing within the buffer.
uint MTDArrayBuffer::index ( uint  row,
uint  col 
) const
inline

Definition of indexing within the buffer.

Definition at line 99 of file MTDArrayBuffer.h.

References nrows.

Referenced by BeautifulSoup.PageElement::_invert(), add_energy(), energy(), global_point(), local_error(), set(), set_energy(), set_global_point(), set_local_error(), set_subDet(), set_time(), set_time_error(), subDet(), time(), and time_error().

99 { return col * nrows + row; }
int col
Definition: cuy.py:1009
uint MTDArrayBuffer::index ( const FTLCluster::FTLHitPos pix) const
inline

Definition at line 100 of file MTDArrayBuffer.h.

References FTLCluster::FTLHitPos::col(), index(), and FTLCluster::FTLHitPos::row().

Referenced by BeautifulSoup.PageElement::_invert(), and index().

100 { return index(pix.row(), pix.col()); }
constexpr int row() const
Definition: FTLCluster.h:61
uint index(uint row, uint col) const
Definition of indexing within the buffer.
constexpr int col() const
Definition: FTLCluster.h:62
bool MTDArrayBuffer::inside ( uint  row,
uint  col 
) const
inline

Definition at line 134 of file MTDArrayBuffer.h.

References ncols, and nrows.

134 { return (row < nrows && col < ncols); }
int col
Definition: cuy.py:1009
LocalError MTDArrayBuffer::local_error ( uint  row,
uint  col 
) const
inline

Definition at line 150 of file MTDArrayBuffer.h.

References hitLE_vec, and index().

Referenced by MTDThresholdClusterizer::make_cluster(), and set().

150 { return hitLE_vec[index(row, col)]; }
uint index(uint row, uint col) const
Definition of indexing within the buffer.
int col
Definition: cuy.py:1009
std::vector< LocalError > hitLE_vec
LocalError MTDArrayBuffer::local_error ( const FTLCluster::FTLHitPos pix) const
inline

Definition at line 151 of file MTDArrayBuffer.h.

References hitLE_vec, and index().

151 { return hitLE_vec[index(pix)]; }
uint index(uint row, uint col) const
Definition of indexing within the buffer.
std::vector< LocalError > hitLE_vec
uint MTDArrayBuffer::rows ( ) const
inline

Definition at line 44 of file MTDArrayBuffer.h.

References nrows.

Referenced by MTDThresholdClusterizer::make_cluster(), setSize(), and MTDThresholdClusterizer::setup().

44 { return nrows; }
void MTDArrayBuffer::set ( uint  row,
uint  col,
GeomDetEnumerators::Location  subDet,
float  energy,
float  time,
float  time_error,
const LocalError local_error,
const GlobalPoint global_point 
)
inline

Definition at line 156 of file MTDArrayBuffer.h.

References energy(), global_point(), hitEnergy_vec, hitGP_vec, hitLE_vec, hitSubDet_vec, hitTime_vec, hitTimeError_vec, index(), local_error(), subDet(), time(), and time_error().

Referenced by MTDThresholdClusterizer::copy_to_buffer(), and set().

163  {
164  hitSubDet_vec[index(row, col)] = subDet;
165  hitEnergy_vec[index(row, col)] = energy;
166  hitTime_vec[index(row, col)] = time;
168  hitGP_vec[index(row, col)] = global_point;
169  hitLE_vec[index(row, col)] = local_error;
170 }
float time_error(uint row, uint col) const
GeomDetEnumerators::Location subDet(uint row, uint col) const
Use subDet to identify whether the Hit is in BTL or ETL.
std::vector< GlobalPoint > hitGP_vec
std::vector< float > hitEnergy_vec
std::vector< GeomDetEnumerators::Location > hitSubDet_vec
LocalError local_error(uint row, uint col) const
float time(uint row, uint col) const
float energy(uint row, uint col) const
GlobalPoint global_point(uint row, uint col) const
std::vector< float > hitTime_vec
uint index(uint row, uint col) const
Definition of indexing within the buffer.
int col
Definition: cuy.py:1009
std::vector< float > hitTimeError_vec
std::vector< LocalError > hitLE_vec
void MTDArrayBuffer::set ( const FTLCluster::FTLHitPos pix,
GeomDetEnumerators::Location  subDet,
float  energy,
float  time,
float  time_error,
const LocalError local_error,
const GlobalPoint global_point 
)
inline

Definition at line 171 of file MTDArrayBuffer.h.

References FTLCluster::FTLHitPos::col(), energy(), global_point(), local_error(), FTLCluster::FTLHitPos::row(), set(), subDet(), time(), and time_error().

177  {
179 }
float time_error(uint row, uint col) const
GeomDetEnumerators::Location subDet(uint row, uint col) const
Use subDet to identify whether the Hit is in BTL or ETL.
LocalError local_error(uint row, uint col) const
float time(uint row, uint col) const
constexpr int row() const
Definition: FTLCluster.h:61
float energy(uint row, uint col) const
GlobalPoint global_point(uint row, uint col) const
void set(uint row, uint col, GeomDetEnumerators::Location subDet, float energy, float time, float time_error, const LocalError &local_error, const GlobalPoint &global_point)
constexpr int col() const
Definition: FTLCluster.h:62
void MTDArrayBuffer::set_energy ( uint  row,
uint  col,
float  energy 
)
inline

Definition at line 188 of file MTDArrayBuffer.h.

References energy(), hitEnergy_vec, and index().

Referenced by clear().

188 { hitEnergy_vec[index(row, col)] = energy; }
std::vector< float > hitEnergy_vec
float energy(uint row, uint col) const
uint index(uint row, uint col) const
Definition of indexing within the buffer.
int col
Definition: cuy.py:1009
void MTDArrayBuffer::set_energy ( const FTLCluster::FTLHitPos pix,
float  energy 
)
inline

Definition at line 189 of file MTDArrayBuffer.h.

References energy(), hitEnergy_vec, and index().

189 { hitEnergy_vec[index(pix)] = energy; }
std::vector< float > hitEnergy_vec
float energy(uint row, uint col) const
uint index(uint row, uint col) const
Definition of indexing within the buffer.
void MTDArrayBuffer::set_global_point ( uint  row,
uint  col,
const GlobalPoint gp 
)
inline

Definition at line 202 of file MTDArrayBuffer.h.

References runTauDisplay::gp, hitGP_vec, and index().

Referenced by clear().

202 { hitGP_vec[index(row, col)] = gp; }
std::vector< GlobalPoint > hitGP_vec
uint index(uint row, uint col) const
Definition of indexing within the buffer.
int col
Definition: cuy.py:1009
void MTDArrayBuffer::set_global_point ( const FTLCluster::FTLHitPos pix,
const GlobalPoint gp 
)
inline

Definition at line 203 of file MTDArrayBuffer.h.

References runTauDisplay::gp, hitGP_vec, and index().

203  {
204  hitGP_vec[index(pix)] = gp;
205 }
std::vector< GlobalPoint > hitGP_vec
uint index(uint row, uint col) const
Definition of indexing within the buffer.
void MTDArrayBuffer::set_local_error ( uint  row,
uint  col,
const LocalError le 
)
inline

Definition at line 207 of file MTDArrayBuffer.h.

References hitLE_vec, and index().

Referenced by clear().

207 { hitLE_vec[index(row, col)] = le; }
uint index(uint row, uint col) const
Definition of indexing within the buffer.
int col
Definition: cuy.py:1009
std::vector< LocalError > hitLE_vec
void MTDArrayBuffer::set_local_error ( const FTLCluster::FTLHitPos pix,
const LocalError le 
)
inline

Definition at line 208 of file MTDArrayBuffer.h.

References hitLE_vec, and index().

208  {
209  hitLE_vec[index(pix)] = le;
210 }
uint index(uint row, uint col) const
Definition of indexing within the buffer.
std::vector< LocalError > hitLE_vec
void MTDArrayBuffer::set_subDet ( uint  row,
uint  col,
GeomDetEnumerators::Location  subDet 
)
inline

Definition at line 181 of file MTDArrayBuffer.h.

References hitSubDet_vec, index(), and subDet().

Referenced by clear().

181  {
182  hitSubDet_vec[index(row, col)] = subDet;
183 }
GeomDetEnumerators::Location subDet(uint row, uint col) const
Use subDet to identify whether the Hit is in BTL or ETL.
std::vector< GeomDetEnumerators::Location > hitSubDet_vec
uint index(uint row, uint col) const
Definition of indexing within the buffer.
int col
Definition: cuy.py:1009
void MTDArrayBuffer::set_subDet ( const FTLCluster::FTLHitPos pix,
GeomDetEnumerators::Location  subDet 
)
inline

Definition at line 184 of file MTDArrayBuffer.h.

References hitSubDet_vec, index(), and subDet().

184  {
185  hitSubDet_vec[index(pix)] = subDet;
186 }
GeomDetEnumerators::Location subDet(uint row, uint col) const
Use subDet to identify whether the Hit is in BTL or ETL.
std::vector< GeomDetEnumerators::Location > hitSubDet_vec
uint index(uint row, uint col) const
Definition of indexing within the buffer.
void MTDArrayBuffer::set_time ( uint  row,
uint  col,
float  time 
)
inline

Definition at line 192 of file MTDArrayBuffer.h.

References hitTime_vec, index(), and time().

Referenced by clear().

192 { hitTime_vec[index(row, col)] = time; }
float time(uint row, uint col) const
std::vector< float > hitTime_vec
uint index(uint row, uint col) const
Definition of indexing within the buffer.
int col
Definition: cuy.py:1009
void MTDArrayBuffer::set_time ( const FTLCluster::FTLHitPos pix,
float  time 
)
inline

Definition at line 193 of file MTDArrayBuffer.h.

References hitTime_vec, index(), and time().

193 { hitTime_vec[index(pix)] = time; }
float time(uint row, uint col) const
std::vector< float > hitTime_vec
uint index(uint row, uint col) const
Definition of indexing within the buffer.
void MTDArrayBuffer::set_time_error ( uint  row,
uint  col,
float  time_error 
)
inline

Definition at line 195 of file MTDArrayBuffer.h.

References hitTimeError_vec, index(), and time_error().

Referenced by clear().

195  {
197 }
float time_error(uint row, uint col) const
uint index(uint row, uint col) const
Definition of indexing within the buffer.
int col
Definition: cuy.py:1009
std::vector< float > hitTimeError_vec
void MTDArrayBuffer::set_time_error ( const FTLCluster::FTLHitPos pix,
float  time_error 
)
inline

Definition at line 198 of file MTDArrayBuffer.h.

References hitTimeError_vec, index(), and time_error().

198  {
200 }
float time_error(uint row, uint col) const
uint index(uint row, uint col) const
Definition of indexing within the buffer.
std::vector< float > hitTimeError_vec
void MTDArrayBuffer::setSize ( uint  rows,
uint  cols 
)
inline

Definition at line 123 of file MTDArrayBuffer.h.

References hitEnergy_vec, hitGP_vec, hitLE_vec, hitSubDet_vec, hitTime_vec, hitTimeError_vec, GeomDetEnumerators::invalidLoc, ncols, nrows, and rows().

Referenced by MTDThresholdClusterizer::setup().

123  {
125  hitEnergy_vec.resize(rows * cols, 0);
126  hitTime_vec.resize(rows * cols, 0);
127  hitTimeError_vec.resize(rows * cols, 0);
128  hitGP_vec.resize(rows * cols);
129  hitLE_vec.resize(rows * cols);
130  nrows = rows;
131  ncols = cols;
132 }
std::vector< GlobalPoint > hitGP_vec
uint rows() const
std::vector< float > hitEnergy_vec
std::vector< GeomDetEnumerators::Location > hitSubDet_vec
std::vector< float > hitTime_vec
std::vector< float > hitTimeError_vec
std::vector< LocalError > hitLE_vec
uint MTDArrayBuffer::size ( void  ) const
inline

Definition at line 96 of file MTDArrayBuffer.h.

References hitEnergy_vec.

Referenced by ntupleDataFormat._Collection::__iter__(), and ntupleDataFormat._Collection::__len__().

96 { return hitEnergy_vec.size(); }
std::vector< float > hitEnergy_vec
GeomDetEnumerators::Location MTDArrayBuffer::subDet ( uint  row,
uint  col 
) const
inline

Use subDet to identify whether the Hit is in BTL or ETL.

Definition at line 136 of file MTDArrayBuffer.h.

References hitSubDet_vec, and index().

Referenced by MTDThresholdClusterizer::make_cluster(), set(), and set_subDet().

136 { return hitSubDet_vec[index(row, col)]; }
std::vector< GeomDetEnumerators::Location > hitSubDet_vec
uint index(uint row, uint col) const
Definition of indexing within the buffer.
int col
Definition: cuy.py:1009
GeomDetEnumerators::Location MTDArrayBuffer::subDet ( const FTLCluster::FTLHitPos pix) const
inline

Definition at line 137 of file MTDArrayBuffer.h.

References hitSubDet_vec, and index().

137  {
138  return hitSubDet_vec[index(pix)];
139 }
std::vector< GeomDetEnumerators::Location > hitSubDet_vec
uint index(uint row, uint col) const
Definition of indexing within the buffer.
float MTDArrayBuffer::time ( uint  row,
uint  col 
) const
inline

Definition at line 144 of file MTDArrayBuffer.h.

References hitTime_vec, and index().

Referenced by MTDThresholdClusterizer::make_cluster(), set(), and set_time().

144 { return hitTime_vec[index(row, col)]; }
std::vector< float > hitTime_vec
uint index(uint row, uint col) const
Definition of indexing within the buffer.
int col
Definition: cuy.py:1009
float MTDArrayBuffer::time ( const FTLCluster::FTLHitPos pix) const
inline

Definition at line 145 of file MTDArrayBuffer.h.

References hitTime_vec, and index().

145 { return hitTime_vec[index(pix)]; }
std::vector< float > hitTime_vec
uint index(uint row, uint col) const
Definition of indexing within the buffer.
float MTDArrayBuffer::time_error ( uint  row,
uint  col 
) const
inline

Definition at line 147 of file MTDArrayBuffer.h.

References hitTimeError_vec, and index().

Referenced by MTDThresholdClusterizer::make_cluster(), set(), and set_time_error().

147 { return hitTimeError_vec[index(row, col)]; }
uint index(uint row, uint col) const
Definition of indexing within the buffer.
int col
Definition: cuy.py:1009
std::vector< float > hitTimeError_vec
float MTDArrayBuffer::time_error ( const FTLCluster::FTLHitPos pix) const
inline

Definition at line 148 of file MTDArrayBuffer.h.

References hitTimeError_vec, and index().

148 { return hitTimeError_vec[index(pix)]; }
uint index(uint row, uint col) const
Definition of indexing within the buffer.
std::vector< float > hitTimeError_vec

Member Data Documentation

std::vector<float> MTDArrayBuffer::hitEnergy_vec
private

Definition at line 104 of file MTDArrayBuffer.h.

Referenced by add_energy(), energy(), set(), set_energy(), setSize(), and size().

std::vector<GlobalPoint> MTDArrayBuffer::hitGP_vec
private

Definition at line 107 of file MTDArrayBuffer.h.

Referenced by global_point(), set(), set_global_point(), and setSize().

std::vector<LocalError> MTDArrayBuffer::hitLE_vec
private

Definition at line 108 of file MTDArrayBuffer.h.

Referenced by local_error(), set(), set_local_error(), and setSize().

std::vector<GeomDetEnumerators::Location> MTDArrayBuffer::hitSubDet_vec
private

Definition at line 103 of file MTDArrayBuffer.h.

Referenced by set(), set_subDet(), setSize(), and subDet().

std::vector<float> MTDArrayBuffer::hitTime_vec
private

Definition at line 105 of file MTDArrayBuffer.h.

Referenced by set(), set_time(), setSize(), and time().

std::vector<float> MTDArrayBuffer::hitTimeError_vec
private

Definition at line 106 of file MTDArrayBuffer.h.

Referenced by set(), set_time_error(), setSize(), and time_error().

uint MTDArrayBuffer::ncols
private

Definition at line 110 of file MTDArrayBuffer.h.

Referenced by columns(), inside(), and setSize().

uint MTDArrayBuffer::nrows
private

Definition at line 109 of file MTDArrayBuffer.h.

Referenced by index(), inside(), rows(), and setSize().