9 bool IsHodoX(
const std::string det_name)
11 return det_name.length() >= 3 && (det_name[2] ==
'T' || det_name[2] ==
'B');
29 int GetPlanePos(
const int det,
double& x,
double& y,
double& z)
38 int GetElementPos(
const int det,
const int ele,
double& x,
double& y,
double& z)
50 Track1D::Track1D(
const XY_t xy) : type_xy(xy), chi2(0), pos(0), slope(0), ndf(0)
59 for (
unsigned int ih = 0; ih <
list_hit.size(); ih++) {
60 short det =
list_hit[ih]->get_detector_id();
61 short ele =
list_hit[ih]->get_element_id();
62 double x_ele, y_ele, z_ele;
65 else graph.SetPoint(ih, z_ele, y_ele);
67 graph.Fit(
"pol1",
"Q0");
68 TF1* f1 =
graph.GetFunction(
"pol1");
69 chi2 = f1->GetChisquare();
71 pos = f1->GetParameter(0);
72 slope = f1->GetParameter(1);
double getPlaneCenterX(int detectorID)
double getPlaneCenterY(int detectorID)
An SQ interface class to hold one detector hit.
bool IsHodoX(const std::string det_name)
TVector3 GetPos(const double z)
int GetElementPos(const int det, const int ele, double &x, double &y, double &z)
virtual short get_detector_id() const
Return the detector ID of this hit.
double getPlaneSpacing(int detectorID) const
bool IsHodoY(const std::string det_name)
static GeomSvc * instance()
singlton instance
double getPlaneCenterZ(int detectorID)
int getPlaneNElements(int detectorID)
int GetPlanePos(const int det, double &x, double &y, double &z)