#include <CTPPSToFDetector.h>
|
void | AddHit (double x, double y, double tof) |
|
void | clear () |
|
| CTPPSToFDetector (int ncellx, int ncelly, std::vector< double > &cellw, double cellh, double pitchx, double pitchy, double pos, int res) |
|
| CTPPSToFDetector (int ncellx, int ncelly, double cellw, double cellh, double pitchx, double pitchy, double pos, int res) |
|
int | findCellId (double x, double y) |
|
bool | get_CellCenter (int cell_id, double &x, double &y) |
|
int | get_CellId (int idx) |
|
int | get_CellMultiplicity () |
|
int | get_nHits_ () |
|
std::vector< double > | get_ToF (int cell) |
|
int | getADC (int cell, int hit) |
|
double | getHeight () |
|
int | getMultiplicityByCell (int cellid) |
|
double | getPosition () |
|
double | getWidth () |
|
virtual | ~CTPPSToFDetector () |
|
Definition at line 8 of file CTPPSToFDetector.h.
CTPPSToFDetector::CTPPSToFDetector |
( |
int |
ncellx, |
|
|
int |
ncelly, |
|
|
std::vector< double > & |
cellw, |
|
|
double |
cellh, |
|
|
double |
pitchx, |
|
|
double |
pitchy, |
|
|
double |
pos, |
|
|
int |
res |
|
) |
| |
Definition at line 4 of file CTPPSToFDetector.cc.
References cellColumn_, cellH_, cellRow_, cellW_, detH_, detPosition_, detW_, mps_fire::i, nCellX_, nCellY_, and pitchX_.
19 double x1 = 0., x2 = 0.;
27 cellColumn_.push_back(std::pair<double, double>(x1, x2));
std::vector< std::pair< double, double > > cellRow_
std::vector< std::pair< double, double > > cellColumn_
std::vector< double > cellW_
CTPPSToFDetector::CTPPSToFDetector |
( |
int |
ncellx, |
|
|
int |
ncelly, |
|
|
double |
cellw, |
|
|
double |
cellh, |
|
|
double |
pitchx, |
|
|
double |
pitchy, |
|
|
double |
pos, |
|
|
int |
res |
|
) |
| |
Definition at line 34 of file CTPPSToFDetector.cc.
References cellColumn_, cellH_, cellRow_, cellWq_, detH_, detPosition_, detW_, mps_fire::i, nCellX_, nCellY_, pitchX_, and pitchY_.
50 double y1 =
cellH_ * (
i - nCellY_ * 0.5) +
pitchY_ * (
i - (nCellY_ - 1) * 0.5);
52 cellRow_.push_back(std::pair<double, double>(y1, y2));
59 cellColumn_.push_back(std::pair<double, double>(x1, x2));
std::vector< std::pair< double, double > > cellRow_
std::vector< std::pair< double, double > > cellColumn_
virtual CTPPSToFDetector::~CTPPSToFDetector |
( |
| ) |
|
|
inlinevirtual |
void CTPPSToFDetector::AddHit |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
tof |
|
) |
| |
Definition at line 62 of file CTPPSToFDetector.cc.
References findCellId(), fToFResolution_, mps_fire::i, nADC_, nHits_, and theToFInfo.
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);
int findCellId(double x, double y)
std::map< int, std::vector< int > > nADC_
std::map< int, std::vector< double > > theToFInfo
void CTPPSToFDetector::clear |
( |
void |
| ) |
|
|
inline |
int CTPPSToFDetector::findCellId |
( |
double |
x, |
|
|
double |
y |
|
) |
| |
bool CTPPSToFDetector::get_CellCenter |
( |
int |
cell_id, |
|
|
double & |
x, |
|
|
double & |
y |
|
) |
| |
int CTPPSToFDetector::get_CellId |
( |
int |
idx | ) |
|
|
inline |
Definition at line 27 of file CTPPSToFDetector.h.
References theToFInfo.
30 std::map<int, std::vector<double> >::const_iterator it =
theToFInfo.begin();
31 std::advance(it, idx);
std::map< int, std::vector< double > > theToFInfo
int CTPPSToFDetector::get_CellMultiplicity |
( |
| ) |
|
|
inline |
int CTPPSToFDetector::get_nHits_ |
( |
| ) |
|
|
inline |
std::vector<double> CTPPSToFDetector::get_ToF |
( |
int |
cell | ) |
|
|
inline |
Definition at line 42 of file CTPPSToFDetector.h.
References theToFInfo.
44 return std::vector<double>();
std::map< int, std::vector< double > > theToFInfo
int CTPPSToFDetector::getADC |
( |
int |
cell, |
|
|
int |
hit |
|
) |
| |
|
inline |
double CTPPSToFDetector::getHeight |
( |
| ) |
|
|
inline |
int CTPPSToFDetector::getMultiplicityByCell |
( |
int |
cellid | ) |
|
|
inline |
double CTPPSToFDetector::getPosition |
( |
| ) |
|
|
inline |
double CTPPSToFDetector::getWidth |
( |
| ) |
|
|
inline |
std::vector<std::pair<double, double> > CTPPSToFDetector::cellColumn_ |
|
private |
double CTPPSToFDetector::cellH_ |
|
private |
std::vector<std::pair<double, double> > CTPPSToFDetector::cellRow_ |
|
private |
std::vector<double> CTPPSToFDetector::cellW_ |
|
private |
double CTPPSToFDetector::cellWq_ |
|
private |
double CTPPSToFDetector::detH_ |
|
private |
int CTPPSToFDetector::detId_ |
|
private |
double CTPPSToFDetector::detPosition_ |
|
private |
double CTPPSToFDetector::detW_ |
|
private |
int CTPPSToFDetector::fToFResolution_ |
|
private |
std::map<int, std::vector<int> > CTPPSToFDetector::nADC_ |
|
private |
int CTPPSToFDetector::nCellX_ |
|
private |
int CTPPSToFDetector::nCellY_ |
|
private |
int CTPPSToFDetector::nHits_ |
|
private |
double CTPPSToFDetector::pitchX_ |
|
private |
double CTPPSToFDetector::pitchY_ |
|
private |
std::map<int, std::vector<double> > CTPPSToFDetector::theToFInfo |
|
private |