JG ROOT Tools libraries  version 5.0 - august 2014
RContourBaseEllipse Class Reference

#include <RContourBaseEllipse.hh>

Inheritance diagram for RContourBaseEllipse:
RContourBase2D RAffine2D RContourBase RMatrix2D

Public Member Functions

 RContourBaseEllipse ()
 
 RContourBaseEllipse (const Double_t a, const Double_t b)
 
 RContourBaseEllipse (const RPoint2D ctr, const Double_t a, const Double_t b)
 
 RContourBaseEllipse (const Double_t a, const Double_t b, const Double_t angle)
 
 RContourBaseEllipse (const RPoint2D ctr, const Double_t a, const Double_t b, const Double_t angle)
 
 RContourBaseEllipse (const RPoint2D ctr, const RVector2D xa, const RVector2D yb)
 
 RContourBaseEllipse (const RContourBaseEllipse &ct)
 
RContourBaseEllipseoperator= (const RContourBaseEllipse &ct)
 
virtual ~RContourBaseEllipse ()
 
virtual bool Compare (const RContourBase *ct_ptr) const
 
virtual TList * CreateObjectList () const
 
virtual bool WriteData (ostream &os) const
 
virtual bool WriteData (FILE *fptr) const
 
virtual bool CheckPoint (const Double_t x, const Double_t y) const
 
virtual bool CheckPoint (const RPoint2D &p) const
 
virtual Int_t Type () const
 
virtual string TypeName () const
 
virtual Double_t NormalisedDistance (const RPoint2D &p) const
 
virtual Double_t GetAngle () const
 
virtual RVector2D GetAxisA () const
 
virtual RVector2D GetAxisB () const
 
virtual RPoint2D GetCenter () const
 
virtual Double_t GetRadiusA () const
 
virtual Double_t GetRadiusB () const
 
virtual void SetCenter (const RPoint2D ctr)
 
 ClassDef (RContourBaseEllipse, 0)
 
- Public Member Functions inherited from RContourBase2D
 RContourBase2D ()
 
 RContourBase2D (const RContourBase2D &ct)
 
RContourBase2Doperator= (const RContourBase2D &ct)
 
virtual ~RContourBase2D ()
 
virtual bool CheckValue (const Double_t val) const
 
virtual Int_t Dimension () const
 
 ClassDef (RContourBase2D, 0)
 
- Public Member Functions inherited from RContourBase
 RContourBase ()
 
 RContourBase (const RContourBase &ct)
 
RContourBaseoperator= (const RContourBase &ct)
 
virtual ~RContourBase ()
 
virtual bool operator== (const RContourBase &ct) const
 
virtual bool operator!= (const RContourBase &ct) const
 
virtual void SetFlipAxis (const bool flip=true)
 
virtual bool GetFlipAxis () const
 
virtual bool Write (ostream &os) const
 
virtual bool Write (FILE *fptr) const
 
 ClassDef (RContourBase, 0)
 
- Public Member Functions inherited from RAffine2D
 RAffine2D ()
 
 RAffine2D (const RMatrix2D &m)
 
 RAffine2D (const RVector2D &t, const RMatrix2D &m=RMatrix2D::id)
 
 RAffine2D (const RVector2D &v0, const RVector2D &v1, const RVector2D &v2, const RMatrixDef type=axisVector)
 
 RAffine2D (const RAffine2D &a)
 
RAffine2Doperator= (const RAffine2D &a)
 
RAffine2Doperator= (const RMatrix2D &m)
 
RAffine2Doperator= (const RVector2D &v)
 
virtual ~RAffine2D ()
 
virtual RMatrix2D GetMatrix () const
 
virtual RVector2D GetTranslation () const
 
virtual RVector2D GetVector () const
 
virtual RPoint2D GetOrigin () const
 
virtual void SetOrigin (const RPoint2D ctr)
 
virtual void SetAxis (const u_int n, const RPoint2D v)
 
RAffine2D Inverse () const
 
RVector2D Transform (const RVector2D &v) const
 
RAffine2D operator+ () const
 
RAffine2D operator- () const
 
RAffine2D operator+= (const RAffine2D &t)
 
RAffine2D operator-= (const RAffine2D &t)
 
RAffine2D operator*= (const RAffine2D &t)
 
RAffine2D operator*= (const Double_t r)
 
RAffine2D operator/= (const Double_t r)
 
RAffine2D operator+ (const RAffine2D &t) const
 
RAffine2D operator- (const RAffine2D &t) const
 
RAffine2D operator* (const RAffine2D &t) const
 
RVector2D operator* (const RVector2D &v) const
 
RAffine2D operator* (const Double_t r) const
 
RAffine2D operator/ (const Double_t r) const
 
 ClassDef (RAffine2D, 0)
 
- Public Member Functions inherited from RMatrix2D
 RMatrix2D (const Double_t diag=1.)
 
 RMatrix2D (const Double_t m00, const Double_t m01, const Double_t m10, const Double_t m11)
 
 RMatrix2D (const RVector2D v1, const RVector2D v2, const RMatrixDef type=columnVector)
 
 RMatrix2D (const RMatrix2D &m)
 
virtual RVector2D operator[] (const u_int n) const
 
virtual RVector2D GetColumn (const u_int n) const
 
virtual RVector2D GetLine (const u_int n) const
 
virtual RVector2D GetAxis (const u_int n) const
 
virtual void SetColumn (const u_int n, const RPoint2D v)
 
virtual void SetLine (const u_int n, const RPoint2D v)
 
Double_t Determinant () const
 
RMatrix2D Inverse () const
 
RVector2D Transform (const RVector2D &v) const
 
RMatrix2D operator+ () const
 
RMatrix2D operator- () const
 
RMatrix2D operator+= (const RMatrix2D &m)
 
RMatrix2D operator-= (const RMatrix2D &m)
 
RMatrix2D operator*= (const RMatrix2D &m)
 
RMatrix2D operator*= (const Double_t r)
 
RMatrix2D operator/= (const Double_t r)
 
RMatrix2D operator+ (const RMatrix2D &m) const
 
RMatrix2D operator- (const RMatrix2D &m) const
 
RMatrix2D operator* (const RMatrix2D &m) const
 
RVector2D operator* (const RVector2D &v) const
 
RMatrix2D operator* (const Double_t r) const
 
RMatrix2D operator/ (const Double_t r) const
 
 ClassDef (RMatrix2D, 0)
 

Static Public Member Functions

static RContourBaseEllipseReadNew (istream &is)
 
static RContourBaseEllipseReadNew (FILE *fptr)
 
- Static Public Member Functions inherited from RContourBase
static RContourBaseReadNew (istream &is)
 
static RContourBaseReadNew (FILE *fptr)
 
- Static Public Member Functions inherited from RMatrix2D
static RMatrix2D Rotation (const Double_t angle)
 

Private Member Functions

 GObject (RContourBaseEllipse)
 

Additional Inherited Members

- Public Types inherited from RMatrix2D
enum  RMatrixDef { columnVector = 0, lineVector = 1, axisVector = 2 }
 Interprétation des vecteurs à la création d'une matrice. More...
 
- Static Public Attributes inherited from RMatrix2D
static const RMatrix2D null = RMatrix2D(0.)
 Matrice nulle.
 
static const RMatrix2D id = RMatrix2D(1.)
 Matrice identité
 
static const Double_t zero = RVector2D::zero
 Limites de test du zéro
 
- Protected Attributes inherited from RContourBase
bool flip_axis
 Axis inversion.
 
- Protected Attributes inherited from RAffine2D
RVector2D tr
 Translation vector (new center)
 
- Protected Attributes inherited from RMatrix2D
Double_t me [4]
 Eléménts de matrice.
 

Detailed Description

Class for ellipse contour parameters. An ellipse is defined here as a circle in a frame transformation. Then the condition for beeing inside is simply x*x + y*y <= 1 in the modified frame (see Ellipse).

Center and axis are defined with the RAffine2D transform base class.

Constructor & Destructor Documentation

RContourBaseEllipse::RContourBaseEllipse ( )

Default constructor: circle with center (0,0) and radius 1.

Referenced by ReadNew().

RContourBaseEllipse::RContourBaseEllipse ( const Double_t  a,
const Double_t  b 
)

Ellipse contour data: center (0,0), principal axis a and b along X and Y directions.

Parameters
aradius along X
bradius along Y
RContourBaseEllipse::RContourBaseEllipse ( const RPoint2D  ctr,
const Double_t  a,
const Double_t  b 
)

Ellipse contour data: center ctr, principal axis a and b along X and Y directions.

Parameters
ctrellipse center
aradius along X
bradius along Y
RContourBaseEllipse::RContourBaseEllipse ( const Double_t  a,
const Double_t  b,
const Double_t  angle 
)

Ellipse contour data: center (0,0), principal axis a and b with rotation angle with respect to (X,Y) frame.

Parameters
aradius along X before rotation
bradius along Y before rotation
anglerotation angle
RContourBaseEllipse::RContourBaseEllipse ( const RPoint2D  ctr,
const Double_t  a,
const Double_t  b,
const Double_t  angle 
)

Ellipse contour data: center ctr, principal axis a and b with rotation angle with respect to (X,Y) frame.

Parameters
ctrellipse center
aradius along X before rotation
bradius along Y before rotation
anglerotation angle
RContourBaseEllipse::RContourBaseEllipse ( const RPoint2D  ctr,
const RVector2D  xa,
const RVector2D  yb 
)

Ellipse contour corresponding to a circle in the new frame with center and axis given as arguments.

Parameters
ctrellipse center
xanew axis vector
ybnew axis vector
RContourBaseEllipse::RContourBaseEllipse ( const RContourBaseEllipse ct)

Copy constructor.

Parameters
ctcontour to copy
RContourBaseEllipse::~RContourBaseEllipse ( )
virtual

Destructor.

Member Function Documentation

RContourBaseEllipse::GObject ( RContourBaseEllipse  )
private

Macro from GCpp library that defines the following functions:

  • ClassName(): return the real class name of the object
  • StaticClassName(): return the used class name of the object (that may be a base class of the real object).
  • IsInstanceOf<T>(): return true if the current object is an instance of the template class name argument
  • Clone(): return an allocated copy of the object.
RContourBaseEllipse & RContourBaseEllipse::operator= ( const RContourBaseEllipse ct)

Affectation operator.

Parameters
ctcontour to copy
bool RContourBaseEllipse::Compare ( const RContourBase ct_ptr) const
virtual

Comparison function, operating only on content, not on name.

Parameters
ct_ptrpointer to compared contour

Implements RContourBase.

References GetAngle(), GetAxisA(), GetAxisB(), GetCenter(), RVector2D::Length(), RContourBase::Type(), and RVector2D::zero.

TList * RContourBaseEllipse::CreateObjectList ( ) const
virtual

Creation of associated ROOT objects list: a new list is created (allocated) and its pointer is returned.

Implements RContourBase.

References RContourBase::flip_axis, GetAngle(), GetCenter(), GetRadiusA(), and GetRadiusB().

bool RContourBaseEllipse::WriteData ( ostream &  os) const
virtual

Write contour data in an output C++ stream.

Parameters
osoutput C++ stream

Implements RContourBase.

References GetAngle(), GetCenter(), GetRadiusA(), and GetRadiusB().

bool RContourBaseEllipse::WriteData ( FILE *  fptr) const
virtual

Write contour data in an output C-style file.

Parameters
fptrC-style file pointer

Implements RContourBase.

References GetAngle(), GetCenter(), GetRadiusA(), and GetRadiusB().

RContourBaseEllipse * RContourBaseEllipse::ReadNew ( istream &  is)
static

Read contour data from an input C++ stream, and return the allocated pointer.

Parameters
isinput C++ stream

References RContourBaseEllipse().

Referenced by RContourBase::ReadNew().

RContourBaseEllipse * RContourBaseEllipse::ReadNew ( FILE *  fptr)
static

Read contour data from an input C-style file, and return the allocated pointer.

Parameters
fptrinput C-style file pointer

References RContourBaseEllipse().

bool RContourBaseEllipse::CheckPoint ( const Double_t  x,
const Double_t  y 
) const
inlinevirtual

Check whether a point (x,y) is inside a contour.

Parameters
xpoint X position
ypoint Y position

Reimplemented from RContourBase2D.

bool RContourBaseEllipse::CheckPoint ( const RPoint2D p) const
inlinevirtual

Check whether a point is inside a contour.

Parameters
ppoint

Implements RContourBase2D.

References RAffine2D::Transform().

Int_t RContourBaseEllipse::Type ( ) const
inlinevirtual

Return contour type identifier.

Implements RContourBase.

string RContourBaseEllipse::TypeName ( ) const
inlinevirtual

Return contour type name.

Implements RContourBase.

Double_t RContourBaseEllipse::NormalisedDistance ( const RPoint2D p) const
inlinevirtual

Get normalized distance (expressed in radii units) between a point and the ellipse center: from 0 (at center) to 1 (on ellipse) and more than 1 outside.

Parameters
ppoint

References RAffine2D::Transform().

Double_t RContourBaseEllipse::GetAngle ( ) const
virtual

Compute rotation (or tilt) angle of the ellipse, with respect to (X,Y) frame.

References GetAxisA(), RVector2D::X(), RVector2D::Y(), and RMatrix2D::zero.

Referenced by Compare(), CreateObjectList(), RGContourEdit::UpdateContourInfo(), and WriteData().

RVector2D RContourBaseEllipse::GetAxisA ( ) const
virtual

Compute first principal radius vector.

References RMatrix2D::Determinant(), RMatrix2D::GetLine(), and RMatrix2D::zero.

Referenced by Compare(), GetAngle(), and GetRadiusA().

RVector2D RContourBaseEllipse::GetAxisB ( ) const
virtual

Compute second principal radius vector.

References RMatrix2D::Determinant(), RMatrix2D::GetLine(), and RMatrix2D::zero.

Referenced by Compare(), and GetRadiusB().

RPoint2D RContourBaseEllipse::GetCenter ( ) const
inlinevirtual

Get ellipse center.

References RAffine2D::GetOrigin().

Referenced by Compare(), CreateObjectList(), and WriteData().

Double_t RContourBaseEllipse::GetRadiusA ( ) const
inlinevirtual

Get first principal radius.

References GetAxisA().

Referenced by CreateObjectList(), RGContourEdit::UpdateContourInfo(), and WriteData().

Double_t RContourBaseEllipse::GetRadiusB ( ) const
inlinevirtual

Get second principal radius.

References GetAxisB().

Referenced by CreateObjectList(), RGContourEdit::UpdateContourInfo(), and WriteData().

void RContourBaseEllipse::SetCenter ( const RPoint2D  ctr)
inlinevirtual

Set ellipse center.

Parameters
ctrnew center

References RAffine2D::SetOrigin().

RContourBaseEllipse::ClassDef ( RContourBaseEllipse  ,
 
)

For ROOT dictionary.


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