5 int ncellx,
int ncelly, std::vector<double>& cellw,
double cellh,
double pitchx,
double pitchy,
double pos,
int res)
19 double x1 = 0.,
x2 = 0.;
35 int ncellx,
int ncelly,
double cellwq,
double cellh,
double pitchx,
double pitchy,
double pos,
int res)
52 cellRow_.push_back(std::pair<double, double>(y1, y2));
59 cellColumn_.push_back(std::pair<double, double>(x1, x2));
68 std::vector<double>* tofs = &(
theToFInfo.find(cellid)->second);
69 int ntof = tofs->size();
72 for (; i < ntof; i++) {
73 if (fabs(tofs->at(i) - tof) * oneOverRes < 3) {
74 tofs->at(i) = (tofs->at(i) + tof) / 2.;
75 nADC_.at(cellid).at(i)++;
81 nADC_[cellid].push_back(1);
87 unsigned int start_idx = 0;
88 unsigned int end_idx =
cellRow_.size();
89 for (i = 0; i <
cellRow_.size(); i++) {
98 for (i = start_idx; i < end_idx; i++) {
104 x_idx = i + 1 - start_idx;
105 return 100 * y_idx + x_idx;
111 unsigned int y_idx =
int(cell_id * 0.01);
112 unsigned int x_idx = cell_id - y_idx * 100;
bool get_CellCenter(int cell_id, double &x, double &y)
std::vector< std::pair< double, double > > cellRow_
int findCellId(double x, double y)
std::map< int, std::vector< int > > nADC_
void AddHit(double x, double y, double tof)
std::vector< std::pair< double, double > > cellColumn_
CTPPSToFDetector(int ncellx, int ncelly, std::vector< double > &cellw, double cellh, double pitchx, double pitchy, double pos, int res)
std::map< int, std::vector< double > > theToFInfo
std::vector< double > cellW_