47 :o_(o), u_(u), v_(v), finitePlane_(finite)
55 :o_(o), finitePlane_(finite)
173 setNormal( TVector3(TMath::Sin(theta)*TMath::Cos(phi),TMath::Sin(theta)*TMath::Sin(phi),TMath::Cos(theta)) );
179 return TVector2(
u_*x,
v_*x);
212 if (
u_.Dot(
v_) < 1.E-5)
return;
222 <<
"O("<<
o_.X()<<
", "<<
o_.Y()<<
", "<<
o_.Z()<<
") "
223 <<
"u("<<
u_.X()<<
", "<<
u_.Y()<<
", "<<
u_.Z()<<
") "
224 <<
"v("<<
v_.X()<<
", "<<
v_.Y()<<
", "<<
v_.Z()<<
") "
243 static const double detplaneEpsilon = 1.E-5;
245 fabs( (lhs.
o_.X()-rhs.
o_.X()) ) > detplaneEpsilon ||
246 fabs( (lhs.
o_.Y()-rhs.
o_.Y()) ) > detplaneEpsilon ||
247 fabs( (lhs.
o_.Z()-rhs.
o_.Z()) ) > detplaneEpsilon
250 fabs( (lhs.
u_.X()-rhs.
u_.X()) ) > detplaneEpsilon ||
251 fabs( (lhs.
u_.Y()-rhs.
u_.Y()) ) > detplaneEpsilon ||
252 fabs( (lhs.
u_.Z()-rhs.
u_.Z()) ) > detplaneEpsilon
255 fabs( (lhs.
v_.X()-rhs.
v_.X()) ) > detplaneEpsilon ||
256 fabs( (lhs.
v_.Y()-rhs.
v_.Y()) ) > detplaneEpsilon ||
257 fabs( (lhs.
v_.Z()-rhs.
v_.Z()) ) > detplaneEpsilon
269 return fabs( (point.X()-
o_.X()) * (
u_.Y()*
v_.Z() -
u_.Z()*
v_.Y()) +
270 (point.Y()-
o_.Y()) * (
u_.Z()*
v_.X() -
u_.X()*
v_.Z()) +
271 (point.Z()-
o_.Z()) * (
u_.X()*
v_.Y() -
u_.Y()*
v_.X()));
276 return fabs( (x-
o_.X()) * (
u_.Y()*
v_.Z() -
u_.Z()*
v_.Y()) +
277 (y-
o_.Y()) * (
u_.Z()*
v_.X() -
u_.X()*
v_.Z()) +
278 (z-
o_.Z()) * (
u_.X()*
v_.Y() -
u_.Y()*
v_.X()));
283 TVector3 dirNorm(dir.Unit());
285 double dirTimesN = dirNorm*normal;
286 if(fabs(dirTimesN)<1.
E-6){
287 return TVector2(1.E100,1.E100);
289 double t = 1./dirTimesN * ((
o_-
point)*normal);
290 return project(point -
o_ + t * dirNorm);
296 const double& dirX,
const double& dirY,
const double& dirZ,
297 double&
u,
double&
v)
const {
300 double dirTimesN = dirX*W.X() + dirY*W.Y() + dirZ*W.Z();
301 if(fabs(dirTimesN)<1.
E-6){
306 double t = 1./dirTimesN * ((
o_.X()-posX)*W.X() +
307 (
o_.Y()-posY)*W.Y() +
308 (
o_.Z()-posZ)*W.Z());
310 double posOnPlaneX = posX-
o_.X() + t*dirX;
311 double posOnPlaneY = posY-
o_.Y() + t*dirY;
312 double posOnPlaneZ = posZ-
o_.Z() + t*dirZ;
314 u =
u_.X()*posOnPlaneX +
u_.Y()*posOnPlaneY +
u_.Z()*posOnPlaneZ;
315 v =
v_.X()*posOnPlaneX +
v_.Y()*posOnPlaneY +
v_.Z()*posOnPlaneZ;
321 u_.Rotate(angle, normal);
322 v_.Rotate(angle, normal);
336 void DetPlane::Streamer(TBuffer &R__b)
342 typedef ::genfit::DetPlane thisClass;
344 if (R__b.IsReading()) {
345 Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
if (R__v) { }
357 AbsFinitePlane *
p = (AbsFinitePlane*)(cl->New());
358 cl->Streamer(p, R__b);
361 R__b.CheckByteCount(R__s, R__c, thisClass::IsA());
363 R__c = R__b.WriteVersion(thisClass::IsA(), kTRUE);
404 R__b.SetByteCount(R__c, kTRUE);