33 #include "TLorentzVector.h" 38 class ROOTGeomAnalyzer;
66 PlaneParam(Double_t ain=0, Double_t
bin=0, Double_t cin=0, Double_t din=0)
67 {
a = ain;
b =
bin;
c = cin;
d = din; Normalize(); }
69 {
a = abcd[0];
b = abcd[1];
c = abcd[2];
d = abcd[3]; Normalize(); }
73 if (mag>0) {
a /= mag;
b /= mag; c /= mag;
d /= mag; } }
74 Double_t
Vn(
const TVector3& raybase)
const 75 {
return raybase.X()*
a + raybase.Y()*
b + raybase.Z()*
c +
d; }
76 Double_t
Vd(
const TVector3& raycos)
const 77 {
return raycos.Px()*
a + raycos.Py()*
b + raycos.Pz()*
c; }
78 Bool_t
IsValid()
const {
return (
a != 0 ||
b != 0 ||
c != 0 ); }
81 friend std::ostream&
operator<< (std::ostream& stream,
102 virtual void Print(std::ostream&
stream)
const = 0;
103 friend std::ostream&
operator<< (std::ostream& stream,
110 FidSphere(
const TVector3& center, Double_t
radius) : fCenter(center), fSRadius(radius) { ; }
123 : fCylBase(base), fCylAxis(axis), fCylRadius(radius), fCylCap1(cap1), fCylCap2(cap2) { ; }
125 RayIntercept InterceptUncapped(
const TVector3& start,
const TVector3& dir)
const;
142 void clear() { fPolyFaces.clear(); }
153 #endif // _FID_SHAPE_H_ Some simple volumes that know how to calculate where a ray intercepts them.
Int_t fSurfOut
what surface was hit on way in
Double_t Vn(const TVector3 &raybase) const
THE MAIN GENIE PROJECT NAMESPACE
Bool_t fIsHit
distance along ray to exit fid volume
const XML_Char int const XML_Char int const XML_Char * base
PlaneParam(Double_t ain=0, Double_t bin=0, Double_t cin=0, Double_t din=0)
PlaneParam fCylCap1
radius of cylinder
FidPolyhedron()
convex polyhedron is made of multiple planar equations
Int_t fSurfIn
was the volume hit
A ROOT/GEANT4 geometry driver.
PlaneParam(Double_t *abcd)
Double_t fCylRadius
direction cosines of cylinder axis
TVector3 fCylAxis
base point on cylinder axis
void Print(std::string prefix, std::string name, std::string suffix="")
Var Sqrt(const Var &v)
Use to take sqrt of a var.
FidCylinder(const TVector3 &base, const TVector3 &axis, Double_t radius, const PlaneParam &cap1, const PlaneParam &cap2)
Double_t fDistOut
distance along ray to enter fid volume
Double_t fSRadius
center of the sphere
std::vector< PlaneParam > fPolyFaces
PlaneParam fCylCap2
define a plane for 1st cylinder cap
FidSphere(const TVector3 ¢er, Double_t radius)
void push_back(const PlaneParam &pln)
std::ostream & operator<<(std::ostream &stream, const genie::geometry::PlaneParam &pparam)
Double_t Vd(const TVector3 &raycos) const