AliRoot Core  da88d91 (da88d91)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMUONSegment Class Reference

A basic line segment, used for contour making algorithm(s) More...

#include <AliMUONSegment.h>

Inheritance diagram for AliMUONSegment:

Public Member Functions

 AliMUONSegment ()
 
 AliMUONSegment (Double_t xstart, Double_t ystart, Double_t xend, Double_t yend)
 
virtual ~AliMUONSegment ()
 dtor More...
 
virtual Int_t Compare (const TObject *obj) const
 
virtual Bool_t IsSortable () const
 We are sortable. More...
 
Double_t StartX () const
 Return the x-coordinate of our starting point. More...
 
Double_t StartY () const
 Return the y-coordinate of our starting point. More...
 
Double_t EndX () const
 Return the x-coordinate of our ending point. More...
 
Double_t EndY () const
 Return the y-coordinate of our ending point. More...
 
double SmallerY () const
 Return our smallest y (of starting or ending point) More...
 
Bool_t IsHorizontal () const
 Whether we are a horizontal segment. More...
 
Bool_t IsVertical () const
 Whethere we are a vertical segment. More...
 
Bool_t IsLeftEdge () const
 Whether we are a left edge. More...
 
Bool_t IsRightEdge () const
 Whether we are a right edge. More...
 
double Bottom () const
 Return our bottom y. More...
 
double Top () const
 
double Distance () const
 
Bool_t IsAPoint () const
 Whether we're just a point. More...
 
const char * AsString () const
 
void Print (Option_t *opt="") const
 
void Set (Double_t xstart, Double_t ystart, Double_t xend, Double_t yend)
 

Static Public Member Functions

static Bool_t AreEqual (double a, double b)
 

Private Attributes

Double_t fStartX
 x of start point More...
 
Double_t fStartY
 y of start point More...
 
Double_t fEndX
 x of end point More...
 
Double_t fEndY
 y of end point More...
 
Double_t fSmallerY
 Either StartY or EndY. More...
 
Bool_t fIsHorizontal
 Whether the segment is horizontal. More...
 
Bool_t fIsVertical
 Whether the segment is vertical. More...
 
Bool_t fIsLeftEdge
 Whether the segment is a left edge. More...
 
Bool_t fIsRightEdge
 Whether the segment is a right edge. More...
 
Bool_t fIsAPoint
 Whether start==end. More...
 

Static Private Attributes

static const Double_t fgkPrecision
 Floating point precision used in comparisons. More...
 

Detailed Description

A basic line segment, used for contour making algorithm(s)

A basic line segment, to be used in contour making algorithms.

In particular, this class defines what a left or right edge is.

Also, please note that, due to the way Root collections are sorted (relying on TObject::Compare method), the way the AliMUONSegment::Compare method is implemented below is really important when it comes to understand contour making algorithm. Keep that in mind.

Author
Laurent Aphecetche, Subatech

Definition at line 19 of file AliMUONSegment.h.

Constructor & Destructor Documentation

AliMUONSegment::AliMUONSegment ( )

Ctor

Definition at line 47 of file AliMUONSegment.cxx.

AliMUONSegment::AliMUONSegment ( Double_t  xstart,
Double_t  ystart,
Double_t  xend,
Double_t  yend 
)

Ctor

Definition at line 57 of file AliMUONSegment.cxx.

virtual AliMUONSegment::~AliMUONSegment ( )
inlinevirtual

dtor

Definition at line 25 of file AliMUONSegment.h.

Member Function Documentation

Bool_t AliMUONSegment::AreEqual ( double  a,
double  b 
)
static
const char * AliMUONSegment::AsString ( ) const

Return a string representation of this object

Definition at line 126 of file AliMUONSegment.cxx.

Referenced by Print().

double AliMUONSegment::Bottom ( ) const
inline

Return our bottom y.

Definition at line 57 of file AliMUONSegment.h.

Referenced by AliMUONContourMaker::Sweep().

Int_t AliMUONSegment::Compare ( const TObject *  obj) const
virtual

Compare method, which sort segments in ascending x order if same x, insure that left edges are before right edges within same x, order by increasing bottommost y Mind your steps ! This method is critical to the contour merging algorithm !

Definition at line 76 of file AliMUONSegment.cxx.

double AliMUONSegment::Distance ( ) const

Length of the segment

Definition at line 111 of file AliMUONSegment.cxx.

Referenced by AsString(), and Set().

Double_t AliMUONSegment::EndX ( ) const
inline
Bool_t AliMUONSegment::IsAPoint ( ) const
inline

Whether we're just a point.

Definition at line 64 of file AliMUONSegment.h.

Referenced by AliMUONContourMaker::Sweep().

Bool_t AliMUONSegment::IsHorizontal ( ) const
inline

Whether we are a horizontal segment.

Definition at line 45 of file AliMUONSegment.h.

Referenced by AsString().

Bool_t AliMUONSegment::IsLeftEdge ( ) const
inline

Whether we are a left edge.

Definition at line 51 of file AliMUONSegment.h.

Referenced by AsString(), Compare(), and AliMUONContourMaker::Sweep().

Bool_t AliMUONSegment::IsRightEdge ( ) const
inline

Whether we are a right edge.

Definition at line 54 of file AliMUONSegment.h.

Referenced by AsString(), and Compare().

virtual Bool_t AliMUONSegment::IsSortable ( ) const
inlinevirtual

We are sortable.

Definition at line 30 of file AliMUONSegment.h.

Bool_t AliMUONSegment::IsVertical ( ) const
inline

Whethere we are a vertical segment.

Definition at line 48 of file AliMUONSegment.h.

void AliMUONSegment::Print ( Option_t *  opt = "") const

Printout

Definition at line 119 of file AliMUONSegment.cxx.

void AliMUONSegment::Set ( Double_t  xstart,
Double_t  ystart,
Double_t  xend,
Double_t  yend 
)

Set start and end point, and (re)compute internal values

Definition at line 136 of file AliMUONSegment.cxx.

Referenced by AliMUONSegment(), AliMUONNode::Contribution(), and AliMUONContourMaker::Sweep().

double AliMUONSegment::SmallerY ( ) const
inline

Return our smallest y (of starting or ending point)

Definition at line 42 of file AliMUONSegment.h.

Referenced by Bottom(), and Compare().

Double_t AliMUONSegment::StartX ( ) const
inline
Double_t AliMUONSegment::StartY ( ) const
inline
double AliMUONSegment::Top ( ) const

Max Y of the segment

Definition at line 104 of file AliMUONSegment.cxx.

Referenced by AliMUONContourMaker::Sweep().

Member Data Documentation

Double_t AliMUONSegment::fEndX
private

x of end point

Definition at line 77 of file AliMUONSegment.h.

Referenced by AsString(), Distance(), EndX(), and Set().

Double_t AliMUONSegment::fEndY
private

y of end point

Definition at line 78 of file AliMUONSegment.h.

Referenced by AsString(), Distance(), EndY(), Set(), and Top().

const Double_t AliMUONSegment::fgkPrecision
staticprivate

Floating point precision used in comparisons.

Definition at line 86 of file AliMUONSegment.h.

Referenced by AreEqual(), and Set().

Bool_t AliMUONSegment::fIsAPoint
private

Whether start==end.

Definition at line 84 of file AliMUONSegment.h.

Referenced by IsAPoint(), and Set().

Bool_t AliMUONSegment::fIsHorizontal
private

Whether the segment is horizontal.

Definition at line 80 of file AliMUONSegment.h.

Referenced by IsHorizontal(), and Set().

Bool_t AliMUONSegment::fIsLeftEdge
private

Whether the segment is a left edge.

Definition at line 82 of file AliMUONSegment.h.

Referenced by IsLeftEdge(), and Set().

Bool_t AliMUONSegment::fIsRightEdge
private

Whether the segment is a right edge.

Definition at line 83 of file AliMUONSegment.h.

Referenced by IsRightEdge(), and Set().

Bool_t AliMUONSegment::fIsVertical
private

Whether the segment is vertical.

Definition at line 81 of file AliMUONSegment.h.

Referenced by IsVertical(), and Set().

Double_t AliMUONSegment::fSmallerY
private

Either StartY or EndY.

Definition at line 79 of file AliMUONSegment.h.

Referenced by Set(), and SmallerY().

Double_t AliMUONSegment::fStartX
private

x of start point

Definition at line 75 of file AliMUONSegment.h.

Referenced by AsString(), Distance(), Set(), and StartX().

Double_t AliMUONSegment::fStartY
private

y of start point

Definition at line 76 of file AliMUONSegment.h.

Referenced by AsString(), Distance(), Set(), StartY(), and Top().


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