KaliVeda
Toolkit for HIC analysis
Loading...
Searching...
No Matches
KVIDLine::MyVector2 Class Reference

Detailed Description

A lightweight replacement for the TVector2 class.

This has only been added in order to be able to use KVIDLine in a multi-threaded environment. Something in TVector2 seems to be not thread-friendly (and it is any case deprecated).

The previous implementation of KVIDLine::DistanceToLine(Double_t, Double_t, Double_t, Double_t, Double_t, Double_t, Int_t&) using TVector2 required Mutex locking (R__LOCKGUARD(gGlobalMutex)) to be thread-safe, leading to a huge reduction in speed.

Definition at line 157 of file KVIDLine.h.

Public Member Functions

 MyVector2 (const MyVector2 &T)
 
 MyVector2 (double X, double Y)
 
double Mod () const
 
double Mod2 () const
 
MyVector2 Norm (const MyVector2 &v) const
 
MyVector2operator= (const MyVector2 &T)
 
Double_t Phi () const
 
MyVector2 Proj (const MyVector2 &v) const
 

Private Attributes

double x
 
double y
 

Friends

double operator* (const MyVector2 &a, const MyVector2 &b)
 
MyVector2 operator* (const MyVector2 &a, double s)
 
MyVector2 operator* (double s, const MyVector2 &a)
 
MyVector2 operator- (const MyVector2 &a, const MyVector2 &b)
 

Constructor & Destructor Documentation

◆ MyVector2() [1/2]

KVIDLine::MyVector2::MyVector2 ( double  X,
double  Y 
)
inline

Definition at line 160 of file KVIDLine.h.

◆ MyVector2() [2/2]

KVIDLine::MyVector2::MyVector2 ( const MyVector2 T)
inline

Definition at line 161 of file KVIDLine.h.

Member Function Documentation

◆ Mod()

double KVIDLine::MyVector2::Mod ( ) const
inline

Definition at line 193 of file KVIDLine.h.

◆ Mod2()

double KVIDLine::MyVector2::Mod2 ( ) const
inline

Definition at line 189 of file KVIDLine.h.

◆ Norm()

MyVector2 KVIDLine::MyVector2::Norm ( const MyVector2 v) const
inline

Definition at line 203 of file KVIDLine.h.

◆ operator=()

MyVector2 & KVIDLine::MyVector2::operator= ( const MyVector2 T)
inline

Definition at line 165 of file KVIDLine.h.

◆ Phi()

Double_t KVIDLine::MyVector2::Phi ( ) const
inline

Definition at line 207 of file KVIDLine.h.

◆ Proj()

MyVector2 KVIDLine::MyVector2::Proj ( const MyVector2 v) const
inline

Definition at line 197 of file KVIDLine.h.

Friends And Related Symbol Documentation

◆ operator* [1/3]

double operator* ( const MyVector2 a,
const MyVector2 b 
)
friend

Definition at line 177 of file KVIDLine.h.

◆ operator* [2/3]

MyVector2 operator* ( const MyVector2 a,
double  s 
)
friend

Definition at line 181 of file KVIDLine.h.

◆ operator* [3/3]

MyVector2 operator* ( double  s,
const MyVector2 a 
)
friend

Definition at line 185 of file KVIDLine.h.

◆ operator-

MyVector2 operator- ( const MyVector2 a,
const MyVector2 b 
)
friend

Definition at line 173 of file KVIDLine.h.

Member Data Documentation

◆ x

double KVIDLine::MyVector2::x
private

Definition at line 158 of file KVIDLine.h.

◆ y

double KVIDLine::MyVector2::y
private

Definition at line 158 of file KVIDLine.h.