36 if(clusters.size()==2)
return -1;
43 if ( clusters.size() != 3 )
49 int startWire1 =
int( clusters.at(0)->GetParams().start_point.w /
_w2cm );
50 double startTime1 = clusters.at(0)->GetParams().start_point.t;
51 unsigned int Pl1 = clusters.at(0)->GetParams().start_point.plane;
52 int startWire2 =
int( clusters.at(1)->GetParams().start_point.w /
_w2cm );
53 double startTime2 = clusters.at(1)->GetParams().start_point.t;
54 unsigned int Pl2 = clusters.at(1)->GetParams().start_point.plane;
55 int startWire3 =
int( clusters.at(2)->GetParams().start_point.w /
_w2cm );
56 double startTime3 = clusters.at(2)->GetParams().start_point.t;
57 unsigned int Pl3 = clusters.at(2)->GetParams().start_point.plane;
65 double yS12, zS12, yS13, zS13, yS23, zS23;
84 std::cout <<
"Wire Start Numbers: " <<
std::endl;
85 std::cout <<
"\t" << startWire1 <<
std::endl;
86 std::cout <<
"\t" << startWire2 <<
std::endl;
87 std::cout <<
"\t" << startWire3 <<
std::endl;
92 std::cout <<
"Intersection Pl1-Pl3: ( " << yS13 <<
", " << zS13 <<
" )" <<
std::endl;
93 std::cout <<
"Intersection Pl1-Pl2: ( " << yS12 <<
", " << zS12 <<
" )" <<
std::endl;
94 std::cout <<
"Intersection Pl2-Pl3: ( " << yS23 <<
", " << zS23 <<
" )" <<
std::endl;
100 area =
Area2D( yS12, zS12, yS23, zS23, yS13, zS13 );
103 area =
Area3D( (yS12+yS13)/2. , (zS12+zS13)/2. , startTime1,
104 (yS13+yS23)/2. , (zS13+zS23)/2. , startTime3,
105 (yS12+yS23)/2. , (zS13+zS23)/2. , startTime2 );
108 if (
_verbose ) { std::cout <<
"Area of intersections triangle is: " << area <<
std::endl; }
128 double a = (Ax*(By-Cy)+Bx*(Cy-Ay)+Cx*(Ay-By))*0.5;
130 if ( a < 0 ) { a *= -1; }
138 double Bx,
double By,
double Bz,
139 double Cx,
double Cy,
double Cz ) {
150 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.
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
Class def header for a class CFAlgoStartPointMatch.
Namespace collecting geometry-related classes utilities.
QTextStream & endl(QTextStream &s)