GENIEGenerator
Loading...
Searching...
No Matches
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

◆ PlaneParam() [1/2]

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(); }

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

◆ PlaneParam() [2/2]

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(); }

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

Member Function Documentation

◆ ConvertMaster2Top()

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

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

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

◆ IsValid()

Bool_t genie::geometry::PlaneParam::IsValid ( ) const
inline

Definition at line 77 of file FidShape.h.

77{ return (a != 0 || b != 0 || c != 0 ); }

References a, b, and c.

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

◆ Normalize()

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; } }

References a, b, c, and d.

Referenced by PlaneParam(), and PlaneParam().

◆ Print()

void PlaneParam::Print ( std::ostream & stream) const

Definition at line 63 of file FidShape.cxx.

64{
65 stream << "PlaneParam=[" << a << "," << b << "," << c << "," << d << "]";
66}

References a, b, c, and d.

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

◆ Vd()

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; }

References a, b, and c.

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

◆ Vn()

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; }

References a, b, c, and d.

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

◆ operator<<

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

Member Data Documentation

◆ a

Double_t genie::geometry::PlaneParam::a

Definition at line 83 of file FidShape.h.

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

◆ b

Double_t genie::geometry::PlaneParam::b

Definition at line 83 of file FidShape.h.

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

◆ c

Double_t genie::geometry::PlaneParam::c

Definition at line 83 of file FidShape.h.

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

◆ d

Double_t genie::geometry::PlaneParam::d

Definition at line 83 of file FidShape.h.

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


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