Public Member Functions | Public Attributes | Friends | List of all members
genie::geometry::PlaneParam Class Reference

#include <FidShape.h>

Public Member Functions

 PlaneParam (Double_t ain=0, Double_t bin=0, Double_t cin=0, Double_t din=0)
 
 PlaneParam (Double_t *abcd)
 
void Normalize ()
 
Double_t Vn (const TVector3 &raybase) const
 
Double_t Vd (const TVector3 &raycos) const
 
Bool_t IsValid () const
 
void ConvertMaster2Top (const ROOTGeomAnalyzer *rgeom)
 
void Print (std::ostream &stream) const
 

Public Attributes

Double_t a
 
Double_t b
 
Double_t c
 
Double_t d
 

Friends

std::ostream & operator<< (std::ostream &stream, const genie::geometry::PlaneParam &pparam)
 

Detailed Description

Definition at line 59 of file FidShape.h.

Constructor & Destructor Documentation

genie::geometry::PlaneParam::PlaneParam ( Double_t  ain = 0,
Double_t  bin = 0,
Double_t  cin = 0,
Double_t  din = 0 
)
inline

Definition at line 65 of file FidShape.h.

66  { a = ain; b = bin; c = cin; d = din; Normalize(); }
QTextStream & bin(QTextStream &s)
genie::geometry::PlaneParam::PlaneParam ( Double_t *  abcd)
inline

Definition at line 67 of file FidShape.h.

68  { a = abcd[0]; b = abcd[1]; c = abcd[2]; d = abcd[3]; Normalize(); }

Member Function Documentation

void PlaneParam::ConvertMaster2Top ( const ROOTGeomAnalyzer rgeom)

Definition at line 48 of file FidShape.cxx.

49 {
50  // convert a plane equation from master coordinates to "top vol" coordinates
51  TVector3 dir(a,b,c);
52  rgeom->Master2TopDir(dir); // new a,b,c
53  TVector3 zero(0,0,0);
54  rgeom->Master2Top(zero);
55  a = dir.X();
56  b = dir.Y();
57  c = dir.Z();
58  d = d - ( a*zero.X() + b*zero.Y() + c*zero.Z() );
59 
60 }
string dir
virtual void Master2TopDir(TVector3 &v) const
virtual void Master2Top(TVector3 &v) const
Bool_t genie::geometry::PlaneParam::IsValid ( ) const
inline

Definition at line 77 of file FidShape.h.

77 { return (a != 0 || b != 0 || c != 0 ); }
void genie::geometry::PlaneParam::Normalize ( )
inline

Definition at line 70 of file FidShape.h.

71  { Double_t mag = TMath::Sqrt(a*a+b*b+c*c);
72  if (mag>0) { a /= mag; b /= mag; c /= mag; d /= mag; } }
void PlaneParam::Print ( std::ostream &  stream) const

Definition at line 63 of file FidShape.cxx.

64 {
65  stream << "PlaneParam=[" << a << "," << b << "," << c << "," << d << "]";
66 }
Double_t genie::geometry::PlaneParam::Vd ( const TVector3 &  raycos) const
inline

Definition at line 75 of file FidShape.h.

76  { return raycos.Px()*a + raycos.Py()*b + raycos.Pz()*c; }
Double_t genie::geometry::PlaneParam::Vn ( const TVector3 &  raybase) const
inline

Definition at line 73 of file FidShape.h.

74  { return raybase.X()*a + raybase.Y()*b + raybase.Z()*c + d; }

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  stream,
const genie::geometry::PlaneParam pparam 
)
friend

Member Data Documentation

Double_t genie::geometry::PlaneParam::a

Definition at line 83 of file FidShape.h.

Double_t genie::geometry::PlaneParam::b

Definition at line 83 of file FidShape.h.

Double_t genie::geometry::PlaneParam::c

Definition at line 83 of file FidShape.h.

Double_t genie::geometry::PlaneParam::d

Definition at line 83 of file FidShape.h.


The documentation for this class was generated from the following files: