CLHEP 2.4.6.4
C++ Class Library for High Energy Physics
Loading...
Searching...
No Matches
XF::Pow Class Reference

#include <XF.h>

+ Inheritance diagram for XF::Pow:

Public Member Functions

 Pow (const HepGeom::Transform3D &, Genfun::GENFUNCTION f)
 
virtual ~Pow ()
 
virtual HepGeom::Transform3D operator() (double argument) const
 
virtual HepGeom::Transform3D operator() (const Genfun::Argument &argument) const
 
Powclone () const
 
 Pow (const Pow &right)
 
- Public Member Functions inherited from XF::Function
 Function ()
 
virtual ~Function ()
 
virtual unsigned int dimensionality () const
 
virtual HepGeom::Transform3D operator() (double argument) const =0
 
virtual HepGeom::Transform3D operator() (const Genfun::Argument &argument) const =0
 
virtual Functionclone () const =0
 
 Function (const Function &right)
 

Detailed Description

Definition at line 99 of file XF.h.

Constructor & Destructor Documentation

◆ Pow() [1/2]

XF::Pow::Pow ( const HepGeom::Transform3D xform,
Genfun::GENFUNCTION  f 
)

Definition at line 191 of file XF.cc.

191 :xf (xform),
192 function (f.clone ())
193 {
194 }
void f(void g())
Definition: excDblThrow.cc:38

◆ ~Pow()

XF::Pow::~Pow ( )
virtual

Definition at line 196 of file XF.cc.

197 {
198 delete function;
199 }

◆ Pow() [2/2]

XF::Pow::Pow ( const Pow right)

Definition at line 235 of file XF.cc.

235 :Function (), xf (right.xf),
236 function (right.function->clone ())
237 {
238 }
Function()
Definition: XF.cc:15

Member Function Documentation

◆ clone()

Pow * XF::Pow::clone ( ) const
virtual

Implements XF::Function.

Definition at line 230 of file XF.cc.

231 {
232 return new Pow (*this);
233 }
Pow(const HepGeom::Transform3D &, Genfun::GENFUNCTION f)
Definition: XF.cc:191

◆ operator()() [1/2]

HepGeom::Transform3D XF::Pow::operator() ( const Genfun::Argument argument) const
virtual

Implements XF::Function.

Definition at line 225 of file XF.cc.

226 {
227 return operator () (argument[0]);
228 }
virtual HepGeom::Transform3D operator()(double argument) const
Definition: XF.cc:201

◆ operator()() [2/2]

HepGeom::Transform3D XF::Pow::operator() ( double  argument) const
virtual

Implements XF::Function.

Definition at line 201 of file XF.cc.

202 {
203 //
204 // Get the translation part and the rotation part:
205 //
206 CLHEP::HepRotation rotate = xf.getRotation ();
207 CLHEP::Hep3Vector translate = xf.getTranslation ();
208 CLHEP::HepAxisAngle aa = rotate.axisAngle ();
209 //
210 // Evaluate the function
211 //
212 double nTimes = (*function) (x);
213 //
214 // Modify:
215 //
216 translate *= nTimes;
217 aa.setDelta (aa.delta () * nTimes);
218 //
219 // Now compose these and return a result:
220 //
221 return HepGeom::Translate3D (translate) * HepGeom::Rotate3D (aa.delta (),
222 aa.axis ());
223 }
double delta() const
Hep3Vector axis() const
AA & setDelta(Scalar delta)
HepAxisAngle axisAngle() const
Definition: RotationA.cc:121
CLHEP::HepRotation getRotation() const
CLHEP::Hep3Vector getTranslation() const

Referenced by operator()().


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