|
|
Go to the documentation of this file. 1 #ifndef DataFormats_FTLRecHit_FTLCluster_h
2 #define DataFormats_FTLRecHit_FTLCluster_h
28 constexpr
FTLHit(uint16_t hit_x, uint16_t hit_y,
float hit_energy,
float hit_time,
float hit_time_error)
30 constexpr uint16_t
x() {
return x_; }
31 constexpr uint16_t
y() {
return y_; }
49 constexpr
int dx()
const {
return dx_; }
50 constexpr
int dy()
const {
return dy_; }
62 constexpr
int row()
const {
return row_; }
63 constexpr
int col()
const {
return col_; }
73 static constexpr
unsigned int MAXSPAN = 255;
74 static constexpr
unsigned int MAXPOS = 2047;
85 float const* time_errors,
99 for (
unsigned int i = 0;
i != isize; ++
i) {
100 uint16_t xoffset = xpos[
i] -
xmin;
101 uint16_t yoffset = ypos[
i] -
ymin;
104 if (xoffset > maxRow)
106 if (yoffset > maxCol)
121 inline float x()
const {
126 inline float y()
const {
132 auto t = [
this](
unsigned int i) {
return this->
theHitTIME[
i]; };
228 for (
unsigned int i = 0;
i <
weights.size(); ++
i) {
232 return outFunc(tot, sumW);
237 auto outFunc = [](
float x,
float y) {
248 auto outFunc = [](
float x,
float y) {
250 return (
float)
sqrt(
x) /
y;
std::vector< float > theHitENERGY
float weighted_mean(const std::vector< float > &weights, const std::function< float(unsigned int)> &value) const
float getClusterErrorX() const
constexpr uint16_t time_error()
const std::vector< float > & hitENERGY() const
float getClusterErrorY() const
void packRow(uint16_t xmin, uint16_t xspan)
static int overflow_(uint16_t span)
bool operator<(const FTLCluster &one, const FTLCluster &other)
constexpr uint16_t time()
const std::vector< float > & hitTIME_ERROR() const
float weighted_sum(const std::vector< float > &weights, const std::function< float(unsigned int i)> &sumFunc, const std::function< float(float, float)> &outFunc) const
constexpr int row() const
void setClusterErrorTime(float errtime)
constexpr uint16_t energy()
const std::vector< uint8_t > & hitOffset() const
void setClusterErrorX(float errx)
const std::vector< float > & hitTIME() const
constexpr Shift(int dx, int dy)
void packCol(uint16_t ymin, uint16_t yspan)
constexpr FTLHit(uint16_t hit_x, uint16_t hit_y, float hit_energy, float hit_time, float hit_time_error)
void setClusterErrorY(float erry)
static unsigned const int shift
constexpr FTLHitPos operator+(const Shift &shift) const
static constexpr unsigned int MAXSPAN
float weighted_mean_error(const std::vector< float > &weights, const std::function< float(unsigned int)> &err) const
static constexpr unsigned int MAXPOS
const DetId & detid() const
std::vector< float > theHitTIME
float getClusterErrorTime() const
std::vector< float > theHitTIME_ERROR
constexpr FTLHitPos(int row, int col)
constexpr int col() const
FTLCluster(DetId id, unsigned int isize, float const *energys, float const *times, float const *time_errors, uint16_t const *xpos, uint16_t const *ypos, uint16_t const xmin, uint16_t const ymin)
std::vector< uint8_t > theHitOffset