Logo ROOT   6.21/01
Reference Guide
TEveProjection Class Referenceabstract

Base-class for non-linear projections.

Enables to define an external center of distortion and a scale to fixate a bounding box of a projected point.

Definition at line 26 of file TEveProjections.h.

Classes

struct  PreScaleEntry_t
 

Public Types

enum  EGeoMode_e { kGM_Unknown, kGM_Polygons, kGM_Segments }
 
enum  EPProc_e { kPP_Plane, kPP_Distort, kPP_Full }
 
enum  EPType_e {
  kPT_Unknown, kPT_RPhi, kPT_RhoZ, kPT_3D,
  kPT_End
}
 
typedef std::vector< PreScaleEntry_t >::iterator vPreScale_i
 
typedef std::vector< PreScaleEntry_tvPreScale_t
 

Public Member Functions

 TEveProjection ()
 Constructor. More...
 
virtual ~TEveProjection ()
 
virtual Bool_t AcceptSegment (TEveVector &, TEveVector &, Float_t) const
 
void AddPreScaleEntry (Int_t coord, Float_t max_val, Float_t scale)
 Add new scaling range for given coordinate. More...
 
virtual void BisectBreakPoint (TEveVector &vL, TEveVector &vR, Float_t eps_sqr)
 Find break-point on both sides of the discontinuity. More...
 
virtual void BisectBreakPoint (TEveVector &vL, TEveVector &vR, Bool_t project_result=kFALSE, Float_t depth=0)
 Find break-point on both sides of the discontinuity. More...
 
void ChangePreScaleEntry (Int_t coord, Int_t entry, Float_t new_scale)
 Change scale for given entry and coordinate. More...
 
void ClearPreScales ()
 Clear all pre-scaling information. More...
 
Bool_t GetDisplaceOrigin () const
 
Float_t GetDistortion () const
 
Float_t GetFixR () const
 
Float_t GetFixZ () const
 
EGeoMode_e GetGeoMode () const
 
Float_t GetLimit (Int_t i, Bool_t pos)
 Method previously used by TEveProjectionAxesGL. Now obsolete. More...
 
Float_t GetMaxTrackStep () const
 
const Char_tGetName () const
 
TEveVector GetOrthogonalCenter (int idx, TEveVector &out)
 Get center ortogonal to given axis index. More...
 
Float_t GetPastFixRFac () const
 
Float_t GetPastFixZFac () const
 
virtual Float_tGetProjectedCenter ()
 Get projected center. More...
 
virtual Float_t GetScreenVal (Int_t ax, Float_t value)
 Project point on given axis and return projected value. More...
 
Float_t GetScreenVal (Int_t i, Float_t x, TEveVector &dirVec, TEveVector &oCenter)
 Project point on given axis and return projected value. More...
 
EPType_e GetType () const
 
Bool_t GetUsePreScale () const
 
virtual Float_t GetValForScreenPos (Int_t ax, Float_t value)
 Inverse projection. More...
 
virtual Bool_t HasSeveralSubSpaces () const
 
virtual Bool_t Is2D () const =0
 
virtual Bool_t Is3D () const =0
 
virtual Bool_t IsOnSubSpaceBoundrary (const TEveVector &) const
 
void PreScalePoint (Float_t &x, Float_t &y)
 Pre-scale point (x, y) in projected coordinates for 2D projections: More...
 
void PreScalePoint (Float_t &x, Float_t &y, Float_t &z)
 Pre-scale point (x, y, z) in projected coordinates for 3D projection. More...
 
virtual void ProjectPoint (Float_t &x, Float_t &y, Float_t &z, Float_t d, EPProc_e p=kPP_Full)=0
 
void ProjectPointdv (Double_t *v, Float_t d)
 Project double array. More...
 
void ProjectPointdv (const TEveTrans *t, const Double_t *p, Double_t *v, Float_t d)
 Project double array, converting it to global coordinate system first if transformation matrix is set. More...
 
void ProjectPointfv (Float_t *v, Float_t d)
 Project float array. More...
 
void ProjectPointfv (const TEveTrans *t, const Float_t *p, Float_t *v, Float_t d)
 Project float array, converting it to global coordinate system first if transformation matrix is set. More...
 
void ProjectVector (TEveVector &v, Float_t d)
 Project TEveVector. More...
 
void ProjectVector (const TEveTrans *t, TEveVector &v, Float_t d)
 Project TEveVector, converting it to global coordinate system first if transformation matrix is set. More...
 
const TEveVectorRefCenter () const
 
virtual void SetCenter (TEveVector &v)
 
virtual void SetDirectionalVector (Int_t screenAxis, TEveVector &vec)
 Get vector for axis in a projected space. More...
 
void SetDisplaceOrigin (bool)
 Set flag to displace for center. More...
 
void SetDistortion (Float_t d)
 Set distortion. More...
 
void SetFixR (Float_t x)
 Set fixed radius. More...
 
void SetFixZ (Float_t x)
 Set fixed radius. More...
 
void SetGeoMode (EGeoMode_e m)
 
void SetMaxTrackStep (Float_t x)
 
void SetName (const Char_t *txt)
 
void SetPastFixRFac (Float_t x)
 Set 2's-exponent for relative scaling beyond FixR. More...
 
void SetPastFixZFac (Float_t x)
 Set 2's-exponent for relative scaling beyond FixZ. More...
 
void SetType (EPType_e t)
 
void SetUsePreScale (Bool_t x)
 
virtual Int_t SubSpaceId (const TEveVector &) const
 

Static Public Attributes

static Float_t fgEps = 0.005f
 
static Float_t fgEpsSqr = 0.000025f
 

Protected Member Functions

void PreScaleVariable (Int_t dim, Float_t &v)
 Pre-scale single variable with pre-scale entry dim. More...
 

Protected Attributes

TEveVector fCenter
 
bool fDisplaceOrigin
 
Float_t fDistortion
 
Float_t fFixR
 
Float_t fFixZ
 
EGeoMode_e fGeoMode
 
Float_t fMaxTrackStep
 
TString fName
 
Float_t fPastFixRFac
 
Float_t fPastFixRScale
 
Float_t fPastFixZFac
 
Float_t fPastFixZScale
 
vPreScale_t fPreScales [3]
 
Float_t fScaleR
 
Float_t fScaleZ
 
EPType_e fType
 
Bool_t fUsePreScale
 

#include <TEveProjections.h>

Inheritance diagram for TEveProjection:
[legend]

Member Typedef Documentation

◆ vPreScale_i

typedef std::vector<PreScaleEntry_t>::iterator TEveProjection::vPreScale_i

Definition at line 50 of file TEveProjections.h.

◆ vPreScale_t

Definition at line 49 of file TEveProjections.h.

Member Enumeration Documentation

◆ EGeoMode_e

Enumerator
kGM_Unknown 
kGM_Polygons 
kGM_Segments 

Definition at line 31 of file TEveProjections.h.

◆ EPProc_e

Enumerator
kPP_Plane 
kPP_Distort 
kPP_Full 

Definition at line 30 of file TEveProjections.h.

◆ EPType_e

Enumerator
kPT_Unknown 
kPT_RPhi 
kPT_RhoZ 
kPT_3D 
kPT_End 

Definition at line 29 of file TEveProjections.h.

Constructor & Destructor Documentation

◆ TEveProjection()

TEveProjection::TEveProjection ( )

Constructor.

Definition at line 36 of file TEveProjections.cxx.

◆ ~TEveProjection()

virtual TEveProjection::~TEveProjection ( )
inlinevirtual

Definition at line 79 of file TEveProjections.h.

Member Function Documentation

◆ AcceptSegment()

virtual Bool_t TEveProjection::AcceptSegment ( TEveVector ,
TEveVector ,
Float_t   
) const
inlinevirtual

Reimplemented in TEveRhoZProjection.

Definition at line 133 of file TEveProjections.h.

◆ AddPreScaleEntry()

void TEveProjection::AddPreScaleEntry ( Int_t  coord,
Float_t  value,
Float_t  scale 
)

Add new scaling range for given coordinate.

Arguments:

  • coord 0 ~ x, 1 ~ y, 2 ~ z
  • value value of input coordinate from which to apply this scale;
  • scale the scale to apply from value onwards.

NOTE: If pre-scaling is combined with center-displaced then the scale of the central region should be 1. This limitation can be removed but will cost CPU.

Definition at line 180 of file TEveProjections.cxx.

◆ BisectBreakPoint() [1/2]

void TEveProjection::BisectBreakPoint ( TEveVector vL,
TEveVector vR,
Float_t  eps_sqr 
)
virtual

Find break-point on both sides of the discontinuity.

They still need to be projected after the call. This is an obsolete version of the method that required manual specification of precision – this lead to (infrequent) infinite loops.

Definition at line 337 of file TEveProjections.cxx.

◆ BisectBreakPoint() [2/2]

void TEveProjection::BisectBreakPoint ( TEveVector vL,
TEveVector vR,
Bool_t  project_result = kFALSE,
Float_t  depth = 0 
)
virtual

Find break-point on both sides of the discontinuity.

If project_result is true, the resulting break points will be projected with given depth value.

Definition at line 355 of file TEveProjections.cxx.

◆ ChangePreScaleEntry()

void TEveProjection::ChangePreScaleEntry ( Int_t  coord,
Int_t  entry,
Float_t  new_scale 
)

Change scale for given entry and coordinate.

NOTE: If the first entry you created used other value than 0, one entry (covering range from 0 to this value) was created automatically.

Definition at line 222 of file TEveProjections.cxx.

◆ ClearPreScales()

void TEveProjection::ClearPreScales ( )

Clear all pre-scaling information.

Definition at line 248 of file TEveProjections.cxx.

◆ GetDisplaceOrigin()

Bool_t TEveProjection::GetDisplaceOrigin ( ) const
inline

Definition at line 102 of file TEveProjections.h.

◆ GetDistortion()

Float_t TEveProjection::GetDistortion ( ) const
inline

Definition at line 120 of file TEveProjections.h.

◆ GetFixR()

Float_t TEveProjection::GetFixR ( ) const
inline

Definition at line 121 of file TEveProjections.h.

◆ GetFixZ()

Float_t TEveProjection::GetFixZ ( ) const
inline

Definition at line 122 of file TEveProjections.h.

◆ GetGeoMode()

EGeoMode_e TEveProjection::GetGeoMode ( ) const
inline

Definition at line 108 of file TEveProjections.h.

◆ GetLimit()

Float_t TEveProjection::GetLimit ( Int_t  i,
Bool_t  pos 
)

Method previously used by TEveProjectionAxesGL. Now obsolete.

Definition at line 393 of file TEveProjections.cxx.

◆ GetMaxTrackStep()

Float_t TEveProjection::GetMaxTrackStep ( ) const
inline

Definition at line 129 of file TEveProjections.h.

◆ GetName()

const Char_t* TEveProjection::GetName ( ) const
inline

Definition at line 94 of file TEveProjections.h.

◆ GetOrthogonalCenter()

TEveVector TEveProjection::GetOrthogonalCenter ( int  idx,
TEveVector out 
)

Get center ortogonal to given axis index.

Definition at line 414 of file TEveProjections.cxx.

◆ GetPastFixRFac()

Float_t TEveProjection::GetPastFixRFac ( ) const
inline

Definition at line 125 of file TEveProjections.h.

◆ GetPastFixZFac()

Float_t TEveProjection::GetPastFixZFac ( ) const
inline

Definition at line 126 of file TEveProjections.h.

◆ GetProjectedCenter()

Float_t * TEveProjection::GetProjectedCenter ( )
virtual

Get projected center.

Reimplemented in TEveRhoZProjection.

Definition at line 299 of file TEveProjections.cxx.

◆ GetScreenVal() [1/2]

Float_t TEveProjection::GetScreenVal ( Int_t  ax,
Float_t  value 
)
virtual

Project point on given axis and return projected value.

Definition at line 532 of file TEveProjections.cxx.

◆ GetScreenVal() [2/2]

Float_t TEveProjection::GetScreenVal ( Int_t  i,
Float_t  x,
TEveVector dirVec,
TEveVector oCenter 
)

Project point on given axis and return projected value.

Definition at line 517 of file TEveProjections.cxx.

◆ GetType()

EPType_e TEveProjection::GetType ( ) const
inline

Definition at line 105 of file TEveProjections.h.

◆ GetUsePreScale()

Bool_t TEveProjection::GetUsePreScale ( ) const
inline

Definition at line 110 of file TEveProjections.h.

◆ GetValForScreenPos()

Float_t TEveProjection::GetValForScreenPos ( Int_t  ax,
Float_t  value 
)
virtual

Inverse projection.

Definition at line 430 of file TEveProjections.cxx.

◆ HasSeveralSubSpaces()

virtual Bool_t TEveProjection::HasSeveralSubSpaces ( ) const
inlinevirtual

Reimplemented in TEveRhoZProjection.

Definition at line 132 of file TEveProjections.h.

◆ Is2D()

virtual Bool_t TEveProjection::Is2D ( ) const
pure virtual

◆ Is3D()

virtual Bool_t TEveProjection::Is3D ( ) const
pure virtual

◆ IsOnSubSpaceBoundrary()

virtual Bool_t TEveProjection::IsOnSubSpaceBoundrary ( const TEveVector ) const
inlinevirtual

Reimplemented in TEveRhoZProjection.

Definition at line 135 of file TEveProjections.h.

◆ PreScalePoint() [1/2]

void TEveProjection::PreScalePoint ( Float_t x,
Float_t y 
)

Pre-scale point (x, y) in projected coordinates for 2D projections:

  • RhoZ ~ (rho, z)
  • RPhi ~ (r, phi), scaling phi doesn't make much sense.

Definition at line 153 of file TEveProjections.cxx.

◆ PreScalePoint() [2/2]

void TEveProjection::PreScalePoint ( Float_t x,
Float_t y,
Float_t z 
)

Pre-scale point (x, y, z) in projected coordinates for 3D projection.

Definition at line 162 of file TEveProjections.cxx.

◆ PreScaleVariable()

void TEveProjection::PreScaleVariable ( Int_t  dim,
Float_t v 
)
protected

Pre-scale single variable with pre-scale entry dim.

Definition at line 130 of file TEveProjections.cxx.

◆ ProjectPoint()

virtual void TEveProjection::ProjectPoint ( Float_t x,
Float_t y,
Float_t z,
Float_t  d,
EPProc_e  p = kPP_Full 
)
pure virtual

◆ ProjectPointdv() [1/2]

void TEveProjection::ProjectPointdv ( Double_t v,
Float_t  d 
)

Project double array.

This is a bit piggish as we convert the doubles to floats and back.

Definition at line 64 of file TEveProjections.cxx.

◆ ProjectPointdv() [2/2]

void TEveProjection::ProjectPointdv ( const TEveTrans t,
const Double_t p,
Double_t v,
Float_t  d 
)

Project double array, converting it to global coordinate system first if transformation matrix is set.

This is a bit piggish as we convert the doubles to floats and back.

Definition at line 98 of file TEveProjections.cxx.

◆ ProjectPointfv() [1/2]

void TEveProjection::ProjectPointfv ( Float_t v,
Float_t  d 
)

Project float array.

Definition at line 55 of file TEveProjections.cxx.

◆ ProjectPointfv() [2/2]

void TEveProjection::ProjectPointfv ( const TEveTrans t,
const Float_t p,
Float_t v,
Float_t  d 
)

Project float array, converting it to global coordinate system first if transformation matrix is set.

Definition at line 83 of file TEveProjections.cxx.

◆ ProjectVector() [1/2]

void TEveProjection::ProjectVector ( TEveVector v,
Float_t  d 
)

Project TEveVector.

Definition at line 74 of file TEveProjections.cxx.

◆ ProjectVector() [2/2]

void TEveProjection::ProjectVector ( const TEveTrans t,
TEveVector v,
Float_t  d 
)

Project TEveVector, converting it to global coordinate system first if transformation matrix is set.

Definition at line 118 of file TEveProjections.cxx.

◆ RefCenter()

const TEveVector& TEveProjection::RefCenter ( ) const
inline

Definition at line 97 of file TEveProjections.h.

◆ SetCenter()

virtual void TEveProjection::SetCenter ( TEveVector v)
inlinevirtual

Reimplemented in TEveRhoZProjection.

Definition at line 98 of file TEveProjections.h.

◆ SetDirectionalVector()

void TEveProjection::SetDirectionalVector ( Int_t  screenAxis,
TEveVector vec 
)
virtual

Get vector for axis in a projected space.

Reimplemented in TEveRhoZProjection.

Definition at line 403 of file TEveProjections.cxx.

◆ SetDisplaceOrigin()

void TEveProjection::SetDisplaceOrigin ( bool  x)

Set flag to displace for center.

This options is useful if want to have projected center at (0, 0) position in projected coordinates and want to dismiss gap around projected center in RhoZ projection.

Definition at line 315 of file TEveProjections.cxx.

◆ SetDistortion()

void TEveProjection::SetDistortion ( Float_t  d)

Set distortion.

Definition at line 258 of file TEveProjections.cxx.

◆ SetFixR()

void TEveProjection::SetFixR ( Float_t  x)

Set fixed radius.

Definition at line 270 of file TEveProjections.cxx.

◆ SetFixZ()

void TEveProjection::SetFixZ ( Float_t  x)

Set fixed radius.

Definition at line 280 of file TEveProjections.cxx.

◆ SetGeoMode()

void TEveProjection::SetGeoMode ( EGeoMode_e  m)
inline

Definition at line 107 of file TEveProjections.h.

◆ SetMaxTrackStep()

void TEveProjection::SetMaxTrackStep ( Float_t  x)
inline

Definition at line 130 of file TEveProjections.h.

◆ SetName()

void TEveProjection::SetName ( const Char_t txt)
inline

Definition at line 95 of file TEveProjections.h.

◆ SetPastFixRFac()

void TEveProjection::SetPastFixRFac ( Float_t  x)

Set 2's-exponent for relative scaling beyond FixR.

Definition at line 290 of file TEveProjections.cxx.

◆ SetPastFixZFac()

void TEveProjection::SetPastFixZFac ( Float_t  x)

Set 2's-exponent for relative scaling beyond FixZ.

Definition at line 325 of file TEveProjections.cxx.

◆ SetType()

void TEveProjection::SetType ( EPType_e  t)
inline

Definition at line 104 of file TEveProjections.h.

◆ SetUsePreScale()

void TEveProjection::SetUsePreScale ( Bool_t  x)
inline

Definition at line 111 of file TEveProjections.h.

◆ SubSpaceId()

virtual Int_t TEveProjection::SubSpaceId ( const TEveVector ) const
inlinevirtual

Reimplemented in TEveRhoZProjection.

Definition at line 134 of file TEveProjections.h.

Member Data Documentation

◆ fCenter

TEveVector TEveProjection::fCenter
protected

Definition at line 57 of file TEveProjections.h.

◆ fDisplaceOrigin

bool TEveProjection::fDisplaceOrigin
protected

Definition at line 59 of file TEveProjections.h.

◆ fDistortion

Float_t TEveProjection::fDistortion
protected

Definition at line 64 of file TEveProjections.h.

◆ fFixR

Float_t TEveProjection::fFixR
protected

Definition at line 65 of file TEveProjections.h.

◆ fFixZ

Float_t TEveProjection::fFixZ
protected

Definition at line 66 of file TEveProjections.h.

◆ fGeoMode

EGeoMode_e TEveProjection::fGeoMode
protected

Definition at line 54 of file TEveProjections.h.

◆ fgEps

Float_t TEveProjection::fgEps = 0.005f
static

Definition at line 148 of file TEveProjections.h.

◆ fgEpsSqr

Float_t TEveProjection::fgEpsSqr = 0.000025f
static

Definition at line 149 of file TEveProjections.h.

◆ fMaxTrackStep

Float_t TEveProjection::fMaxTrackStep
protected

Definition at line 73 of file TEveProjections.h.

◆ fName

TString TEveProjection::fName
protected

Definition at line 55 of file TEveProjections.h.

◆ fPastFixRFac

Float_t TEveProjection::fPastFixRFac
protected

Definition at line 67 of file TEveProjections.h.

◆ fPastFixRScale

Float_t TEveProjection::fPastFixRScale
protected

Definition at line 71 of file TEveProjections.h.

◆ fPastFixZFac

Float_t TEveProjection::fPastFixZFac
protected

Definition at line 68 of file TEveProjections.h.

◆ fPastFixZScale

Float_t TEveProjection::fPastFixZScale
protected

Definition at line 72 of file TEveProjections.h.

◆ fPreScales

vPreScale_t TEveProjection::fPreScales[3]
protected

Definition at line 62 of file TEveProjections.h.

◆ fScaleR

Float_t TEveProjection::fScaleR
protected

Definition at line 69 of file TEveProjections.h.

◆ fScaleZ

Float_t TEveProjection::fScaleZ
protected

Definition at line 70 of file TEveProjections.h.

◆ fType

EPType_e TEveProjection::fType
protected

Definition at line 53 of file TEveProjections.h.

◆ fUsePreScale

Bool_t TEveProjection::fUsePreScale
protected

Definition at line 61 of file TEveProjections.h.

Libraries for TEveProjection:
[legend]

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