1 #ifndef RECOTOOL_CFALGOSTARTPOINTMATCH_CXX 2 #define RECOTOOL_CFALGOSTARTPOINTMATCH_CXX 35 if(clusters.size()==2)
return -1;
42 if ( clusters.size() != 3 )
48 int startWire1 = int( clusters.at(0)->GetParams().start_point.w /
_w2cm );
49 double startTime1 = clusters.at(0)->GetParams().start_point.t;
50 unsigned int Pl1 = clusters.at(0)->GetParams().start_point.plane;
51 int startWire2 = int( clusters.at(1)->GetParams().start_point.w /
_w2cm );
52 double startTime2 = clusters.at(1)->GetParams().start_point.t;
53 unsigned int Pl2 = clusters.at(1)->GetParams().start_point.plane;
54 int startWire3 = int( clusters.at(2)->GetParams().start_point.w /
_w2cm );
55 double startTime3 = clusters.at(2)->GetParams().start_point.t;
56 unsigned int Pl3 = clusters.at(2)->GetParams().start_point.plane;
64 double yS12, zS12, yS13, zS13, yS23, zS23;
83 std::cout <<
"Wire Start Numbers: " << std::endl;
84 std::cout <<
"\t" << startWire1 << std::endl;
85 std::cout <<
"\t" << startWire2 << std::endl;
86 std::cout <<
"\t" << startWire3 << std::endl;
87 std::cout << std::endl;
91 std::cout <<
"Intersection Pl1-Pl3: ( " << yS13 <<
", " << zS13 <<
" )" << std::endl;
92 std::cout <<
"Intersection Pl1-Pl2: ( " << yS12 <<
", " << zS12 <<
" )" << std::endl;
93 std::cout <<
"Intersection Pl2-Pl3: ( " << yS23 <<
", " << zS23 <<
" )" << std::endl;
99 area =
Area2D( yS12, zS12, yS23, zS23, yS13, zS13 );
102 area =
Area3D( (yS12+yS13)/2. , (zS12+zS13)/2. , startTime1,
103 (yS13+yS23)/2. , (zS13+zS23)/2. , startTime3,
104 (yS12+yS23)/2. , (zS13+zS23)/2. , startTime2 );
107 if (
_verbose ) { std::cout <<
"Area of intersections triangle is: " << area << std::endl; }
127 double a = (Ax*(By-Cy)+Bx*(Cy-Ay)+Cx*(Ay-By))*0.5;
129 if ( a < 0 ) { a *= -1; }
137 double Bx,
double By,
double Bz,
138 double Cx,
double Cy,
double Cz ) {
149 return 0.5*sqrt( (By*Cz-Cz*By)*(By*Cz-Cz*By) + (Bz*Cx-Bx*Cz)*(Bz*Cx-Bx*Cz) + (Bx*Cy-By*Cx)*(Bx*Cy-By*Cx) );
Double_t TimeToCm() const
Double_t WireToCm() const
bool IntersectionPoint(geo::WireID const &wid1, geo::WireID const &wid2, double &y, double &z) const
Returns the intersection point of two wires.
Class def header for a class CFAlgoStartPointMatch.
Namespace collecting geometry-related classes utilities.