Commit 772ebc28 authored by Joseph Boudreau's avatar Joseph Boudreau
Browse files

Get this all compiling with new transformations + other geometry classes

parent 5e3fc250
......@@ -73,8 +73,8 @@ namespace XF
virtual unsigned int dimensionality () const; //returns 1;
// Function value
virtual HepTransform3D operator () (double argument) const = 0;
virtual HepTransform3D operator () (const Genfun::
virtual HepGeom::Transform3D operator () (double argument) const = 0;
virtual HepGeom::Transform3D operator () (const Genfun::
Argument & argument) const =
0;
......@@ -101,12 +101,12 @@ namespace XF
public:
Pow (const HepTransform3D &, Genfun::GENFUNCTION f);
Pow (const HepGeom::Transform3D &, Genfun::GENFUNCTION f);
virtual ~ Pow ();
virtual HepTransform3D operator () (double argument) const;
virtual HepTransform3D operator () (const Genfun::
virtual HepGeom::Transform3D operator () (double argument) const;
virtual HepGeom::Transform3D operator () (const Genfun::
Argument & argument) const;
// Every function must override this:
......@@ -120,7 +120,7 @@ namespace XF
// Assignment operator
const Pow & operator = (const Pow & right);
const HepTransform3D xf;
const HepGeom::Transform3D xf;
const Genfun::AbsFunction * function;
};
......@@ -130,8 +130,8 @@ namespace XF
Product operator * (const Function & op1, const Function & op2);
PreMult operator * (const HepTransform3D & xf, const Function & op2);
PostMult operator * (const Function & op2, const HepTransform3D & xf);
PreMult operator * (const HepGeom::Transform3D & xf, const Function & op2);
PostMult operator * (const Function & op2, const HepGeom::Transform3D & xf);
// Internally used class:: Product:
......@@ -148,8 +148,8 @@ namespace XF
virtual unsigned int dimensionality () const;
virtual HepTransform3D operator () (double argument) const;
virtual HepTransform3D operator () (const Genfun::
virtual HepGeom::Transform3D operator () (double argument) const;
virtual HepGeom::Transform3D operator () (const Genfun::
Argument & argument) const;
// Every function must override this:
......@@ -173,14 +173,14 @@ namespace XF
public:
PreMult (const HepTransform3D & arg1, const Function * arg2);
PreMult (const HepGeom::Transform3D & arg1, const Function * arg2);
virtual ~ PreMult ();
virtual unsigned int dimensionality () const;
virtual HepTransform3D operator () (double argument) const;
virtual HepTransform3D operator () (const Genfun::
virtual HepGeom::Transform3D operator () (double argument) const;
virtual HepGeom::Transform3D operator () (const Genfun::
Argument & argument) const;
// Every function must override this:
......@@ -191,7 +191,7 @@ namespace XF
private:
const HepTransform3D _arg1;
const HepGeom::Transform3D _arg1;
const Function *_arg2;
};
......@@ -204,14 +204,14 @@ namespace XF
public:
PostMult (const Function * arg1, const HepTransform3D & arg2);
PostMult (const Function * arg1, const HepGeom::Transform3D & arg2);
virtual ~ PostMult ();
virtual unsigned int dimensionality () const;
virtual HepTransform3D operator () (double argument) const;
virtual HepTransform3D operator () (const Genfun::
virtual HepGeom::Transform3D operator () (double argument) const;
virtual HepGeom::Transform3D operator () (const Genfun::
Argument & argument) const;
// Every function must override this:
......@@ -223,7 +223,7 @@ namespace XF
private:
const Function *_arg1;
const HepTransform3D _arg2;
const HepGeom::Transform3D _arg2;
};
......
......@@ -25,12 +25,12 @@ namespace XF
return Product (&a, &b);
}
PreMult operator * (const HepTransform3D & xf, const Function & b)
PreMult operator * (const HepGeom::Transform3D & xf, const Function & b)
{
return PreMult (xf, &b);
}
PostMult operator * (const Function & a, const HepTransform3D & xf)
PostMult operator * (const Function & a, const HepGeom::Transform3D & xf)
{
return PostMult (&a, xf);
}
......@@ -82,12 +82,12 @@ namespace XF
return _arg1->dimensionality ();
}
HepTransform3D Product::operator () (double x) const
HepGeom::Transform3D Product::operator () (double x) const
{
return (*_arg1) (x) * (*_arg2) (x);
}
HepTransform3D Product::operator () (const Genfun::Argument & x) const
HepGeom::Transform3D Product::operator () (const Genfun::Argument & x) const
{
return (*_arg1) (x) * (*_arg2) (x);
}
......@@ -100,7 +100,7 @@ namespace XF
// //
//------------------------------------------------------------------//
PreMult::PreMult (const HepTransform3D & arg1,
PreMult::PreMult (const HepGeom::Transform3D & arg1,
const Function * arg2):_arg1 (arg1),
_arg2 (arg2->clone ())
{
......@@ -130,12 +130,12 @@ namespace XF
return _arg2->dimensionality ();
}
HepTransform3D PreMult::operator () (double x) const
HepGeom::Transform3D PreMult::operator () (double x) const
{
return _arg1 * (*_arg2) (x);
}
HepTransform3D PreMult::operator () (const Genfun::Argument & x) const
HepGeom::Transform3D PreMult::operator () (const Genfun::Argument & x) const
{
return _arg1 * (*_arg2) (x);
}
......@@ -148,7 +148,7 @@ namespace XF
//------------------------------------------------------------------//
PostMult::PostMult (const Function * arg1,
const HepTransform3D & arg2):_arg1 (arg1->clone ()),
const HepGeom::Transform3D & arg2):_arg1 (arg1->clone ()),
_arg2 (arg2)
{
}
......@@ -177,18 +177,18 @@ namespace XF
return _arg1->dimensionality ();
}
HepTransform3D PostMult::operator () (double x) const
HepGeom::Transform3D PostMult::operator () (double x) const
{
return (*_arg1) (x) * _arg2;
}
HepTransform3D PostMult::operator () (const Genfun::Argument & x) const
HepGeom::Transform3D PostMult::operator () (const Genfun::Argument & x) const
{
return (*_arg1) (x) * _arg2;
}
Pow::Pow (const HepTransform3D & xform, Genfun::GENFUNCTION f):xf (xform),
Pow::Pow (const HepGeom::Transform3D & xform, Genfun::GENFUNCTION f):xf (xform),
function (f.clone ())
{
}
......@@ -198,14 +198,14 @@ namespace XF
delete function;
}
HepTransform3D Pow::operator () (double x) const
HepGeom::Transform3D Pow::operator () (double x) const
{
//
// Get the translation part and the rotation part:
//
HepRotation rotate = xf.getRotation ();
Hep3Vector translate = xf.getTranslation ();
HepAxisAngle aa = rotate.axisAngle ();
CLHEP::HepRotation rotate = xf.getRotation ();
CLHEP::Hep3Vector translate = xf.getTranslation ();
CLHEP::HepAxisAngle aa = rotate.axisAngle ();
//
// Evaluate the function
//
......@@ -218,11 +218,11 @@ namespace XF
//
// Now compose these and return a result:
//
return HepTranslate3D (translate) * HepRotate3D (aa.delta (),
return HepGeom::Translate3D (translate) * HepGeom::Rotate3D (aa.delta (),
aa.axis ());
}
HepTransform3D Pow::operator () (const Genfun::Argument & argument) const
HepGeom::Transform3D Pow::operator () (const Genfun::Argument & argument) const
{
return operator () (argument[0]);
}
......
......@@ -2,7 +2,7 @@
INCLUDES = -I../
# libraries to link, and whence
LDADD = -L${top_builddir}/src -lCLHEP-@PACKAGE@-@VERSION@ \
-L${top_builddir}/../Geometry/src -L$(top_builddir)/../GenericFunctions/src -lCLHEP-GenericFunctions-@VERSION@ -lCLHEP-Geometry-@VERSION@
-L${top_builddir}/../Geometry/src -L${top_builddir}/../Vector/src -L${top_builddir}/../GenericFunctions/src -lCLHEP-GenericFunctions-@VERSION@ -lCLHEP-Geometry-@VERSION@ -lCLHEP-Vector-@VERSION@
# Identify executables needed during testing:
check_PROGRAMS = \
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment