43 TMatrixT<Double_t> returnMat(1,1);
45 checkPlane(hit, plane);
50 returnMat[0][0] = rC[6][0];
57 checkPlane(hit, plane);
59 TMatrixT<Double_t> returnCov(1,1);
62 returnCov[0][0] = rawCov[6][6];
74 assert(rC.GetNrows()==7);
76 TVector3 wire1(rC[0][0], rC[1][0], rC[2][0]);
77 TVector3 wire2(rC[3][0], rC[4][0], rC[5][0]);
78 TVector3 wiredirection = wire1 - wire2;
80 TVector3 vaxis = plane.
getV();
81 wiredirection.SetMag(1.);
84 if(fabs(TMath::Abs(wiredirection.Dot(vaxis)) - 1) > 1
e-3)
87 std::cout <<
"GFWireHitPolicy: plane not valid!!" << std::endl;
97 assert(x.GetNrows()==7);
98 TVector3 wire1(x[0][0],x[1][0],x[2][0]);
99 TVector3 wire2(x[3][0],x[4][0],x[5][0]);
102 Double_t d_from_refplane = fDetPlane.dist(wire1).Mag();
103 if(d_from_refplane < 1
e-5)
return fDetPlane;
107 TVector3 poca, poca_onwire, dirInPoca;
113 distance =
TMath::Sqrt(fabs(((wire1-poca).Mag2()*(wire2-wire1).Mag2()-pow((wire1-poca).Dot(wire2-wire1),2))/(wire2-wire1).Mag2()));
116 if(distance > fMaxdistance) {
117 GFException exc(
"distance poca-wire > maxdistance", __LINE__,__FILE__);
124 TVector3 fromwiretoextr = poca - poca_onwire;
125 fromwiretoextr.SetMag(1.);
127 TVector3 wiredirection = wire2 - wire1;
128 wiredirection.SetMag(1.);
131 if(fabs(fromwiretoextr * wiredirection) > 1
e-3) {
132 GFException exc(
"fromwiretoextr*wiredirection > 1e-3", __LINE__,__FILE__);
143 TVector3
O = poca_onwire;
virtual void extrapolateToLine(const TVector3 &point1, const TVector3 &point2, TVector3 &poca, TVector3 &normVec, TVector3 &poca_onwire)
This method extrapolates to the point of closest approach to a line.
process_name opflash particleana ie x
const GFDetPlane & detPlane(GFAbsRecoHit *, GFAbsTrackRep *)
Get detector plane Calls GFAbsTrackRep::extrapolateToLine for POCA.
TMatrixT< Double_t > getRawHitCoord() const
Get raw hit coordinates.
Base Class for genfit track representations. Defines interface for track parameterizations.
void checkPlane(GFAbsRecoHit *, const GFDetPlane &)
Check if the detector plane is valid.
double distance(geo::Point_t const &point, CathodeDesc_t const &cathode)
Returns the distance of a point from the cathode.
TMatrixT< Double_t > hitCoord(GFAbsRecoHit *, const GFDetPlane &)
Hit coordinates in detector plane.
Exception class for error handling in GENFIT (provides storage for diagnostic information) ...
Var Sqrt(const Var &v)
Use to take sqrt of a var.
TMatrixT< Double_t > hitCov(GFAbsRecoHit *, const GFDetPlane &)
Hit covariances in detector plane.
TMatrixT< Double_t > getRawHitCov() const
Get raw hit covariances.
BEGIN_PROLOG could also be cout
static const std::string fPolicyName