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

#include "/cvmfs/nova.opensciencegrid.org/externals/genie/v3_00_06_p01/Linux64bit+2.6-2.12-e17-debug/GENIE-Generator/src/Tools/Geometry/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 60 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 66 of file FidShape.h.

References a, b, bin, plot_validation_datamc::c, and d.

67  { a = ain; b = bin; c = cin; d = din; Normalize(); }
float bin[41]
Definition: plottest35.C:14
genie::geometry::PlaneParam::PlaneParam ( Double_t *  abcd)
inline

Definition at line 68 of file FidShape.h.

References a, b, plot_validation_datamc::c, and d.

69  { 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 52 of file FidShape.cxx.

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

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

53 {
54  // convert a plane equation from master coordinates to "top vol" coordinates
55  TVector3 dir(a,b,c);
56  rgeom->Master2TopDir(dir); // new a,b,c
57  TVector3 zero(0,0,0);
58  rgeom->Master2Top(zero);
59  a = dir.X();
60  b = dir.Y();
61  c = dir.Z();
62  d = d - ( a*zero.X() + b*zero.Y() + c*zero.Z() );
63 
64 }
virtual void Master2TopDir(TVector3 &v) const
TDirectory * dir
Definition: macro.C:5
auto zero()
Definition: PMNS.cxx:47
virtual void Master2Top(TVector3 &v) const
Bool_t genie::geometry::PlaneParam::IsValid ( void  ) const
inline
void genie::geometry::PlaneParam::Normalize ( )
inline

Definition at line 71 of file FidShape.h.

References a, b, plot_validation_datamc::c, d, and ana::Sqrt().

72  { Double_t mag = TMath::Sqrt(a*a+b*b+c*c);
73  if (mag>0) { a /= mag; b /= mag; c /= mag; d /= mag; } }
Var Sqrt(const Var &v)
Use to take sqrt of a var.
Definition: Var.cxx:326
void PlaneParam::Print ( std::ostream &  stream) const

Definition at line 67 of file FidShape.cxx.

References a, b, plot_validation_datamc::c, and d.

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

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

Definition at line 76 of file FidShape.h.

References a, b, and plot_validation_datamc::c.

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

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

Definition at line 74 of file FidShape.h.

References a, b, plot_validation_datamc::c, and d.

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

75  { 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 84 of file FidShape.h.

Double_t genie::geometry::PlaneParam::b

Definition at line 84 of file FidShape.h.

Double_t genie::geometry::PlaneParam::c

Definition at line 84 of file FidShape.h.

Double_t genie::geometry::PlaneParam::d

Definition at line 84 of file FidShape.h.


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