GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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.

References a, b, c, d, and Normalize().

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

Definition at line 67 of file FidShape.h.

References a, b, c, d, and Normalize().

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.

References a, genie::units::b, dir, genie::geometry::ROOTGeomAnalyzer::Master2Top(), and genie::geometry::ROOTGeomAnalyzer::Master2TopDir().

Referenced by genie::geometry::FidPolyhedron::ConvertMaster2Top().

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.

References a, b, and c.

Referenced by genie::geometry::FidCylinder::Intercept(), and genie::geometry::FidPolyhedron::Intercept().

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

Definition at line 70 of file FidShape.h.

References a, b, c, and d.

Referenced by PlaneParam().

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.

References a, and genie::units::b.

Referenced by genie::geometry::operator<<().

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.

References a, b, and c.

Referenced by genie::geometry::FidCylinder::Intercept(), and genie::geometry::FidPolyhedron::Intercept().

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.

References a, b, c, and d.

Referenced by genie::geometry::FidCylinder::Intercept(), and genie::geometry::FidPolyhedron::Intercept().

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.

Referenced by IsValid(), Normalize(), PlaneParam(), Vd(), and Vn().

Double_t genie::geometry::PlaneParam::b

Definition at line 83 of file FidShape.h.

Referenced by IsValid(), Normalize(), PlaneParam(), Vd(), and Vn().

Double_t genie::geometry::PlaneParam::c

Definition at line 83 of file FidShape.h.

Referenced by IsValid(), Normalize(), PlaneParam(), Vd(), and Vn().

Double_t genie::geometry::PlaneParam::d

Definition at line 83 of file FidShape.h.

Referenced by Normalize(), PlaneParam(), and Vn().


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