32 #include "TLorentzVector.h"
37 class ROOTGeomAnalyzer;
40 std::ostream&
operator<< (std::ostream& stream,
56 std::ostream&
operator<< (std::ostream& stream,
65 PlaneParam(Double_t ain=0, Double_t bin=0, Double_t cin=0, Double_t din=0)
68 {
a = abcd[0];
b = abcd[1];
c = abcd[2];
d = abcd[3];
Normalize(); }
71 { Double_t mag = TMath::Sqrt(
a*
a+
b*
b+
c*
c);
72 if (mag>0) {
a /= mag;
b /= mag; c /= mag;
d /= mag; } }
73 Double_t
Vn(
const TVector3& raybase)
const
74 {
return raybase.X()*
a + raybase.Y()*
b + raybase.Z()*
c +
d; }
75 Double_t
Vd(
const TVector3& raycos)
const
76 {
return raycos.Px()*
a + raycos.Py()*
b + raycos.Pz()*
c; }
77 Bool_t
IsValid()
const {
return (
a != 0 ||
b != 0 ||
c != 0 ); }
79 void Print(std::ostream& stream)
const;
80 friend std::ostream&
operator<< (std::ostream& stream,
87 std::ostream&
operator<< (std::ostream& stream,
101 virtual void Print(std::ostream& stream)
const = 0;
102 friend std::ostream&
operator<< (std::ostream& stream,
112 void Print(std::ostream& stream)
const;
120 FidCylinder(
const TVector3& base,
const TVector3& axis, Double_t radius,
126 void Print(std::ostream& stream)
const;
144 void Print(std::ostream& stream)
const;
152 #endif // _FID_SHAPE_H_
Some simple volumes that know how to calculate where a ray intercepts them.
void Print(std::ostream &stream) const
Int_t fSurfOut
what surface was hit on way in
void ConvertMaster2Top(const ROOTGeomAnalyzer *rgeom)
Double_t Vn(const TVector3 &raybase) const
RayIntercept Intercept(const TVector3 &start, const TVector3 &dir) const
Bool_t fIsHit
distance along ray to exit fid volume
PlaneParam(Double_t ain=0, Double_t bin=0, Double_t cin=0, Double_t din=0)
PlaneParam fCylCap1
radius of cylinder
RayIntercept Intercept(const TVector3 &start, const TVector3 &dir) const
FidPolyhedron()
convex polyhedron is made of multiple planar equations
Int_t fSurfIn
was the volume hit
friend std::ostream & operator<<(std::ostream &stream, const genie::geometry::PlaneParam &pparam)
RayIntercept InterceptUncapped(const TVector3 &start, const TVector3 &dir) const
A ROOT/GEANT4 geometry driver.
void ConvertMaster2Top(const ROOTGeomAnalyzer *rgeom)
PlaneParam(Double_t *abcd)
Double_t fCylRadius
direction cosines of cylinder axis
TVector3 fCylAxis
base point on cylinder axis
virtual RayIntercept Intercept(const TVector3 &start, const TVector3 &dir) const =0
FidCylinder(const TVector3 &base, const TVector3 &axis, Double_t radius, const PlaneParam &cap1, const PlaneParam &cap2)
virtual void ConvertMaster2Top(const ROOTGeomAnalyzer *rgeom)=0
void Print(std::ostream &stream) const
RayIntercept Intercept(const TVector3 &start, const TVector3 &dir) const
Double_t fDistOut
distance along ray to enter fid volume
void ConvertMaster2Top(const ROOTGeomAnalyzer *rgeom)
void ConvertMaster2Top(const ROOTGeomAnalyzer *rgeom)
Double_t fSRadius
center of the sphere
std::vector< PlaneParam > fPolyFaces
friend std::ostream & operator<<(std::ostream &stream, const genie::geometry::FidShape &shape)
PlaneParam fCylCap2
define a plane for 1st cylinder cap
FidSphere(const TVector3 ¢er, Double_t radius)
virtual void Print(std::ostream &stream) const =0
void push_back(const PlaneParam &pln)
std::ostream & operator<<(std::ostream &stream, const genie::geometry::PlaneParam &pparam)
Double_t Vd(const TVector3 &raycos) const
void Print(std::ostream &stream) const
void Print(std::ostream &stream) const