27 #include "TPolyLine3D.h"
28 #include "TPolyMarker3D.h"
40 :fO(o),fU(u),fV(v),fFinitePlane(finite)
49 fU.SetXYZ(r.Uniform(),r.Uniform(),0.);
50 fV.SetXYZ(r.Uniform(),r.Uniform(),0.);
57 :fO(o),fFinitePlane(finite){
62 if(fFinitePlane!=NULL)
delete fFinitePlane;
73 if (
this == &rhs)
return *
this;
74 if(fFinitePlane!=NULL) {
147 TVector3 result=fU.Cross(fV);
165 if( fabs(n.X()) > 0.1 ){
166 fU.SetXYZ(1./n.X()*(-1.*n.Y()-1.*n.Z()),1.,1.);
170 if(fabs(n.Y()) > 0.1){
171 fU.SetXYZ(1.,1./n.Y()*(-1.*n.X()-1.*n.Z()),1.);
175 fU.SetXYZ(1.,1.,1./n.Z()*(-1.*n.X()-1.*n.Y()));
183 TVector3
n(TMath::Sin(theta)*TMath::Cos(phi),TMath::Sin(theta)*TMath::Sin(phi),TMath::Cos(theta));
192 return TVector2(xfU,xfV);
216 TVector2
p=LabToPlane(x);
217 TVector3 xplane=toLab(p);
226 throw GFException(
"genf::GFDetPlane::sane() sanity check failed", __LINE__, __FILE__).
setFatal();
234 TVector3
n=getNormal();
238 v.Rotate(TMath::Pi()*0.5,n);
240 if (null.Mag() >= 1
E-6)
241 throw GFException(
"genf::GFDetPlane::sane(): non orthogonal!", __LINE__, __FILE__).
setFatal();
250 <<
"O("<<fO.X()<<
","<<fO.Y()<<
","<<fO.Z()<<
") "
251 <<
"u("<<fU.X()<<
","<<fU.Y()<<
","<<fU.Z()<<
") "
252 <<
"v("<<fV.X()<<
","<<fV.Y()<<
","<<fV.Z()<<
") "
253 <<
"n("<<getNormal().X()<<
","<<getNormal().Y()<<
","<<getNormal().Z()<<
") "
255 out << fFinitePlane << std::endl;
256 if(fFinitePlane!=NULL) fFinitePlane->Print(out);
269 #define DETPLANE_EPSILON 1.E-5
290 return !(lhs == rhs);
295 *pl =
new TPolyMarker3D(21*21,24);
296 (*pl)->SetMarkerSize(0.1);
297 (*pl)->SetMarkerColor(kBlue);
300 *plLine =
new TPolyLine3D(5);
306 linevec=(fO+(mesh*i)*fU+(mesh*j)*fV);
307 (*plLine)->SetPoint(0,linevec.X(),linevec.Y(),linevec.Z());
309 linevec=(fO+(mesh*i)*fU+(mesh*j)*fV);
310 (*plLine)->SetPoint(0,linevec.X(),linevec.Y(),linevec.Z());
312 linevec=(fO+(mesh*i)*fU+(mesh*j)*fV);
313 (*plLine)->SetPoint(2,linevec.X(),linevec.Y(),linevec.Z());
315 linevec=(fO+(mesh*i)*fU+(mesh*j)*fV);
316 (*plLine)->SetPoint(1,linevec.X(),linevec.Y(),linevec.Z());
318 linevec=(fO+(mesh*i)*fU+(mesh*j)*fV);
319 (*plLine)->SetPoint(4,linevec.X(),linevec.Y(),linevec.Z());
322 for (
int i=-1*nI;i<=nI;++i){
323 for (
int j=-1*nJ;j<=nJ;++j){
324 TVector3 vec(fO+(mesh*i)*fU+(mesh*j)*fV);
325 int id=(i+10)*21+j+10;
326 (*pl)->SetPoint(
id,vec.X(),vec.Y(),vec.Z());
331 *u =
new TPolyLine3D(2);
332 (*u)->SetPoint(0,fO.X(),fO.Y(),fO.Z());
333 (*u)->SetPoint(1,fO.X()+length*fU.X(),fO.Y()+length*fU.Y(),fO.Z()+length*fU.Z());
334 (*u)->SetLineWidth(2);
335 (*u)->SetLineColor(kGreen);
338 *v =
new TPolyLine3D(2);
339 (*v)->SetPoint(0,fO.X(),fO.Y(),fO.Z());
340 (*v)->SetPoint(1,fO.X()+length*fV.X(),fO.Y()+length*fV.Y(),fO.Z()+length*fV.Z());
341 (*v)->SetLineWidth(2);
342 (*v)->SetLineColor(kRed);
345 *n =
new TPolyLine3D(2);
346 TVector3 _n=getNormal();
347 (*n)->SetPoint(0,fO.X(),fO.Y(),fO.Z());
348 (*n)->SetPoint(1,fO.X()+length*_n.X(),fO.Y()+length*_n.Y(),fO.Z()+length*_n.Z());
349 (*n)->SetLineWidth(2);
350 (*n)->SetLineColor(kBlue);
355 double s = (v - fO)*fU;
356 double t = (v - fO)*fV;
357 TVector3 distanceVector = v - fO - (s*fU) - (t*fV);
358 return distanceVector.Mag();
362 double s = (v - fO)*fU;
363 double t = (v - fO)*fV;
364 TVector3 distanceVector = v - fO - (s*fU) - (t*fV);
365 return distanceVector.Mag();
369 TVector3 dirNorm(dir);
371 TVector3 normal = getNormal();
372 double dirTimesN = dirNorm*normal;
373 if(fabs(dirTimesN)<1.
E-6){
375 return TVector2(1.E100,1.E100);
377 double t = 1/dirTimesN * ((fO-point)*normal);
378 return project(point - fO + t * dirNorm);
process_name opflash particleana ie ie ie z
void set(const TVector3 &o, const TVector3 &u, const TVector3 &v)
void setON(const TVector3 &o, const TVector3 &n)
void setU(const TVector3 &u)
GFDetPlane & operator=(const genf::GFDetPlane &)
bool operator!=(const genf::GFDetPlane &, const genf::GFDetPlane &)
process_name opflash particleana ie x
void getGraphics(double mesh, double length, TPolyMarker3D **pl, TPolyLine3D **plLine, TPolyLine3D **u, TPolyLine3D **v, TPolyLine3D **n=NULL)
for poor attempts of making an event display. There is a lot of room for improvements.
TVector3 dist(const TVector3 &point) const
void setO(const TVector3 &o)
void setUV(const TVector3 &u, const TVector3 &v)
void Print(std::ostream &out=std::cout) const
then echo echo For and will not be changed by echo further linking echo echo B echo The symbol is in the uninitialized data multiple common symbols may appear with the echo same name If the symbol is defined the common echo symbols are treated as undefined references For more echo details on common see the discussion of warn common echo in *Note Linker see the discussion of warn common echo in *Note Linker such as a global int variable echo as opposed to a large global array echo echo I echo The symbol is an indirect reference to another symbol This echo is a GNU extension to the a out object file format which is echo rarely used echo echo N echo The symbol is a debugging symbol echo echo R echo The symbol is in a read only data section echo echo S echo The symbol is in an uninitialized data section for small echo objects echo echo T echo The symbol is in the the normal defined echo symbol is used with no error When a weak undefined symbol echo is linked and the symbol is not the value of the echo weak symbol becomes zero with no error echo echo W echo The symbol is a weak symbol that has not been specifically echo tagged as a weak object symbol When a weak defined symbol echo is linked with a normal defined the normal defined echo symbol is used with no error When a weak undefined symbol echo is linked and the symbol is not the value of the echo weak symbol becomes zero with no error echo echo echo The symbol is a stabs symbol in an a out object file In echo this the next values printed are the stabs other echo the stabs desc and the stab type Stabs symbols are echo used to hold debugging information For more echo see *Note or object file format specific echo echo For Mac OS X
virtual GFAbsFinitePlane * clone() const =0
Deep copy ctor for polymorphic class.
TVector2 project(const TVector3 &x) const
projecting a direction onto the plane:
TVector3 getNormal() const
void setV(const TVector3 &v)
process_name opflash particleana ie ie y
double distance(TVector3 &) const
bool operator==(const genf::GFDetPlane &, const genf::GFDetPlane &)
genf::GFAbsFinitePlane * fFinitePlane
TVector3 toLab(const TVector2 &x) const
transform from plane coordinates to lab system
TVector2 LabToPlane(const TVector3 &x) const
transform from Lab system into plane
TVector2 straightLineToPlane(const TVector3 &point, const TVector3 &dir) const
gives u,v coordinates of the intersection point of a straight line with plane
Exception class for error handling in GENFIT (provides storage for diagnostic information) ...
then echo File list $list not found else cat $list while read file do echo $file sed s
process_name largeant stream1 can override from command line with o or output physics producers generator N
void setNormal(TVector3 n)
GFException & setFatal(bool b=true)
set fatal flag. if this is true, the fit stops for this current track repr.
GFDetPlane(genf::GFAbsFinitePlane *finite=NULL)