Logo ROOT   6.16/01
Reference Guide
List of all members | Public Types | Public Member Functions | Private Attributes | Friends | List of all members
TVector3 Class Reference

TVector3 is a general three vector class, which can be used for the description of different vectors in 3D.

Declaration / Access to the components

TVector3 has been implemented as a vector of three Double_t variables, representing the cartesian coordinates. By default all components are initialized to zero:

TVector3 v1; // v1 = (0,0,0)
TVector3 v3(1,2,3); // v3 = (1,2,3)
TVector3 v4(v2); // v4 = v2
TVector3 is a general three vector class, which can be used for the description of different vectors ...
Definition: TVector3.h:22

It is also possible (but not recommended) to initialize a TVector3 with a Double_t or Float_t C array.

You can get the basic components either by name or by index using operator():

xx = v1.X(); or xx = v1(0);
yy = v1.Y(); yy = v1(1);
zz = v1.Z(); zz = v1(2);
Double_t Z() const
Definition: TVector3.h:218
Double_t Y() const
Definition: TVector3.h:217
Double_t X() const
Definition: TVector3.h:216

The member functions SetX(), SetY(), SetZ() and SetXYZ() allow to set the components:

v1.SetX(1.); v1.SetY(2.); v1.SetZ(3.);
v1.SetXYZ(1.,2.,3.);
void SetY(Double_t)
Definition: TVector3.h:224
void SetXYZ(Double_t x, Double_t y, Double_t z)
Definition: TVector3.h:227
void SetX(Double_t)
Definition: TVector3.h:223
void SetZ(Double_t)
Definition: TVector3.h:225

Non-cartesian coordinates

To get information on the TVector3 in spherical (rho,phi,theta) or cylindrical (z,r,theta) coordinates, the

the member functions Mag() (=magnitude=rho in spherical coordinates), Mag2(), Theta(), CosTheta(), Phi(), Perp() (the transverse component=r in cylindrical coordinates), Perp2() can be used:

Double_t m = v.Mag(); // get magnitude (=rho=Sqrt(x*x+y*y+z*z)))
Double_t m2 = v.Mag2(); // get magnitude squared
Double_t t = v.Theta(); // get polar angle
Double_t ct = v.CosTheta(); // get cos of theta
Double_t p = v.Phi(); // get azimuth angle
Double_t pp = v.Perp(); // get transverse component
Double_t pp2= v.Perp2(); // get transvers component squared
SVector< double, 2 > v
Definition: Dict.h:5
double Double_t
Definition: RtypesCore.h:55
static constexpr double m2
auto * m
Definition: textangle.C:8

It is also possible to get the transverse component with respect to another vector:

Double_t ppv1 = v.Perp(v1);
Double_t pp2v1 = v.Perp2(v1);

The pseudo-rapidity ( eta=-ln (tan (theta/2)) ) can be obtained by Eta() or PseudoRapidity():

Double_t eta = v.PseudoRapidity();

There are set functions to change one of the non-cartesian coordinates:

v.SetTheta(.5); // keeping rho and phi
v.SetPhi(.8); // keeping rho and theta
v.SetMag(10.); // keeping theta and phi
v.SetPerp(3.); // keeping z and phi

Arithmetic / Comparison

The TVector3 class provides the operators to add, subtract, scale and compare vectors:

v3 = -v1;
v1 = v2+v3;
v1 += v3;
v1 = v1 - v3
v1 -= v3;
v1 *= 10;
v1 = 5*v2;
if (v1==v2) {...}
if (v1!=v2) {...}

Related Vectors

v2 = v1.Unit(); // get unit vector parallel to v1
v2 = v1.Orthogonal(); // get vector orthogonal to v1

Scalar and vector products

s = v1.Dot(v2); // scalar product
s = v1 * v2; // scalar product
v = v1.Cross(v2); // vector product
static constexpr double s

Angle between two vectors

Double_t a = v1.Angle(v2);
auto * a
Definition: textangle.C:12

Rotations

Rotation around axes

v.RotateX(.5);
v.RotateY(TMath::Pi());
v.RotateZ(angle);
constexpr Double_t Pi()
Definition: TMath.h:38

Rotation around a vector

v1.Rotate(TMath::Pi()/4, v2); // rotation around v2

Rotation by TRotation

TVector3 objects can be rotated by objects of the TRotation class using the Transform() member functions,

the operator *= or the operator * of the TRotation class:

...
v1.transform(m);
v1 = m*v1;
v1 *= m; // Attention v1 = m*v1
The TRotation class describes a rotation of objects of the TVector3 class.
Definition: TRotation.h:20

Transformation from rotated frame

TVector3 direction = v.Unit()
v1.RotateUz(direction); // direction must be TVector3 of unit length

transforms v1 from the rotated frame (z' parallel to direction, x' in the theta plane and y' in the xy plane as well as perpendicular to the theta plane) to the (x,y,z) frame.

Definition at line 22 of file TVector3.h.

Public Types

typedef Double_t Scalar
 
- Public Types inherited from TObject
enum  {
  kIsOnHeap = 0x01000000 , kNotDeleted = 0x02000000 , kZombie = 0x04000000 , kInconsistent = 0x08000000 ,
  kBitMask = 0x00ffffff
}
 
enum  { kSingleKey = BIT(0) , kOverwrite = BIT(1) , kWriteDelete = BIT(2) }
 
enum  EDeprecatedStatusBits { kObjInCanvas = BIT(3) }
 
enum  EStatusBits {
  kCanDelete = BIT(0) , kMustCleanup = BIT(3) , kIsReferenced = BIT(4) , kHasUUID = BIT(5) ,
  kCannotPick = BIT(6) , kNoContextMenu = BIT(8) , kInvalidObject = BIT(13)
}
 

Public Member Functions

 TVector3 ()
 Constructors. More...
 
 TVector3 (const Double_t *)
 
 TVector3 (const Float_t *)
 
 TVector3 (const TVector3 &)
 
 TVector3 (Double_t x, Double_t y, Double_t z)
 
virtual ~TVector3 ()
 
Double_t Angle (const TVector3 &) const
 Return the angle w.r.t. another 3-vector. More...
 
Double_t CosTheta () const
 
TVector3 Cross (const TVector3 &) const
 
Double_t DeltaPhi (const TVector3 &) const
 
Double_t DeltaR (const TVector3 &) const
 Return deltaR with respect to v. More...
 
Double_t Dot (const TVector3 &) const
 
Double_t DrEtaPhi (const TVector3 &) const
 
Double_t Eta () const
 
TVector2 EtaPhiVector () const
 
void GetXYZ (Double_t *carray) const
 
void GetXYZ (Float_t *carray) const
 
Double_t Mag () const
 
Double_t Mag2 () const
 
Bool_t operator!= (const TVector3 &) const
 
Double_toperator() (int)
 
Double_t operator() (int) const
 
TVector3operator*= (const TRotation &)
 Multiplication operator. More...
 
TVector3operator*= (Double_t)
 
TVector3operator+= (const TVector3 &)
 
TVector3 operator- () const
 
TVector3operator-= (const TVector3 &)
 
TVector3operator= (const TVector3 &)
 
Bool_t operator== (const TVector3 &) const
 
Double_toperator[] (int)
 
Double_t operator[] (int) const
 
TVector3 Orthogonal () const
 
Double_t Perp () const
 Return the transverse component (R in cylindrical coordinate system) More...
 
Double_t Perp (const TVector3 &) const
 Return the transverse component (R in cylindrical coordinate system) More...
 
Double_t Perp2 () const
 
Double_t Perp2 (const TVector3 &) const
 
Double_t Phi () const
 Return the azimuth angle. Returns phi from -pi to pi. More...
 
void Print (Option_t *option="") const
 Print vector parameters. More...
 
Double_t PseudoRapidity () const
 Double_t m = Mag(); return 0.5*log( (m+fZ)/(m-fZ) ); guard against Pt=0. More...
 
Double_t Pt () const
 
Double_t Pt (const TVector3 &) const
 
Double_t Px () const
 
Double_t Py () const
 
Double_t Pz () const
 
void Rotate (Double_t, const TVector3 &)
 Rotate vector. More...
 
void RotateUz (const TVector3 &)
 NewUzVector must be normalized ! More...
 
void RotateX (Double_t)
 Rotate vector around X. More...
 
void RotateY (Double_t)
 Rotate vector around Y. More...
 
void RotateZ (Double_t)
 Rotate vector around Z. More...
 
void SetMag (Double_t)
 
void SetMagThetaPhi (Double_t mag, Double_t theta, Double_t phi)
 Setter with mag, theta, phi. More...
 
void SetPerp (Double_t)
 
void SetPhi (Double_t)
 Set phi keeping mag and theta constant (BaBar). More...
 
void SetPtEtaPhi (Double_t pt, Double_t eta, Double_t phi)
 Set Pt, Eta and Phi. More...
 
void SetPtThetaPhi (Double_t pt, Double_t theta, Double_t phi)
 Set Pt, Theta and Phi. More...
 
void SetTheta (Double_t)
 Set theta keeping mag and phi constant (BaBar). More...
 
void SetX (Double_t)
 
void SetXYZ (Double_t x, Double_t y, Double_t z)
 
void SetY (Double_t)
 
void SetZ (Double_t)
 
Double_t Theta () const
 Return the polar angle. More...
 
TVector3Transform (const TRotation &)
 Transform this vector with a TRotation. More...
 
TVector3 Unit () const
 Return unit vector parallel to this. More...
 
Double_t x () const
 
Double_t X () const
 
TVector2 XYvector () const
 
Double_t y () const
 
Double_t Y () const
 
Double_t z () const
 
Double_t Z () const
 
- Public Member Functions inherited from TObject
 TObject ()
 TObject constructor. More...
 
 TObject (const TObject &object)
 TObject copy ctor. More...
 
virtual ~TObject ()
 TObject destructor. More...
 
void AbstractMethod (const char *method) const
 Use this method to implement an "abstract" method that you don't want to leave purely abstract. More...
 
virtual void AppendPad (Option_t *option="")
 Append graphics object to current pad. More...
 
virtual void Browse (TBrowser *b)
 Browse object. May be overridden for another default action. More...
 
ULong_t CheckedHash ()
 Check and record whether this class has a consistent Hash/RecursiveRemove setup (*) and then return the regular Hash value for this object. More...
 
virtual const char * ClassName () const
 Returns name of class to which the object belongs. More...
 
virtual void Clear (Option_t *="")
 
virtual TObjectClone (const char *newname="") const
 Make a clone of an object using the Streamer facility. More...
 
virtual Int_t Compare (const TObject *obj) const
 Compare abstract method. More...
 
virtual void Copy (TObject &object) const
 Copy this to obj. More...
 
virtual void Delete (Option_t *option="")
 Delete this object. More...
 
virtual Int_t DistancetoPrimitive (Int_t px, Int_t py)
 Computes distance from point (px,py) to the object. More...
 
virtual void Draw (Option_t *option="")
 Default Draw method for all objects. More...
 
virtual void DrawClass () const
 Draw class inheritance tree of the class to which this object belongs. More...
 
virtual TObjectDrawClone (Option_t *option="") const
 Draw a clone of this object in the current selected pad for instance with: gROOT->SetSelectedPad(gPad). More...
 
virtual void Dump () const
 Dump contents of object on stdout. More...
 
virtual void Error (const char *method, const char *msgfmt,...) const
 Issue error message. More...
 
virtual void Execute (const char *method, const char *params, Int_t *error=0)
 Execute method on this object with the given parameter string, e.g. More...
 
virtual void Execute (TMethod *method, TObjArray *params, Int_t *error=0)
 Execute method on this object with parameters stored in the TObjArray. More...
 
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 Execute action corresponding to an event at (px,py). More...
 
virtual void Fatal (const char *method, const char *msgfmt,...) const
 Issue fatal error message. More...
 
virtual TObjectFindObject (const char *name) const
 Must be redefined in derived classes. More...
 
virtual TObjectFindObject (const TObject *obj) const
 Must be redefined in derived classes. More...
 
virtual Option_tGetDrawOption () const
 Get option used by the graphics system to draw this object. More...
 
virtual const char * GetIconName () const
 Returns mime type name of object. More...
 
virtual const char * GetName () const
 Returns name of object. More...
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 Returns string containing info about the object at position (px,py). More...
 
virtual Option_tGetOption () const
 
virtual const char * GetTitle () const
 Returns title of object. More...
 
virtual UInt_t GetUniqueID () const
 Return the unique object id. More...
 
virtual Bool_t HandleTimer (TTimer *timer)
 Execute action in response of a timer timing out. More...
 
virtual ULong_t Hash () const
 Return hash value for this object. More...
 
Bool_t HasInconsistentHash () const
 Return true is the type of this object is known to have an inconsistent setup for Hash and RecursiveRemove (i.e. More...
 
virtual void Info (const char *method, const char *msgfmt,...) const
 Issue info message. More...
 
virtual Bool_t InheritsFrom (const char *classname) const
 Returns kTRUE if object inherits from class "classname". More...
 
virtual Bool_t InheritsFrom (const TClass *cl) const
 Returns kTRUE if object inherits from TClass cl. More...
 
virtual void Inspect () const
 Dump contents of this object in a graphics canvas. More...
 
void InvertBit (UInt_t f)
 
virtual Bool_t IsEqual (const TObject *obj) const
 Default equal comparison (objects are equal if they have the same address in memory). More...
 
virtual Bool_t IsFolder () const
 Returns kTRUE in case object contains browsable objects (like containers or lists of other objects). More...
 
R__ALWAYS_INLINE Bool_t IsOnHeap () const
 
virtual Bool_t IsSortable () const
 
R__ALWAYS_INLINE Bool_t IsZombie () const
 
virtual void ls (Option_t *option="") const
 The ls function lists the contents of a class on stdout. More...
 
void MayNotUse (const char *method) const
 Use this method to signal that a method (defined in a base class) may not be called in a derived class (in principle against good design since a child class should not provide less functionality than its parent, however, sometimes it is necessary). More...
 
virtual Bool_t Notify ()
 This method must be overridden to handle object notification. More...
 
void Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const
 Use this method to declare a method obsolete. More...
 
void operator delete (void *ptr)
 Operator delete. More...
 
void operator delete[] (void *ptr)
 Operator delete []. More...
 
voidoperator new (size_t sz)
 
voidoperator new (size_t sz, void *vp)
 
voidoperator new[] (size_t sz)
 
voidoperator new[] (size_t sz, void *vp)
 
TObjectoperator= (const TObject &rhs)
 TObject assignment operator. More...
 
virtual void Paint (Option_t *option="")
 This method must be overridden if a class wants to paint itself. More...
 
virtual void Pop ()
 Pop on object drawn in a pad to the top of the display list. More...
 
virtual void Print (Option_t *option="") const
 This method must be overridden when a class wants to print itself. More...
 
virtual Int_t Read (const char *name)
 Read contents of object with specified name from the current directory. More...
 
virtual void RecursiveRemove (TObject *obj)
 Recursively remove this object from a list. More...
 
void ResetBit (UInt_t f)
 
virtual void SaveAs (const char *filename="", Option_t *option="") const
 Save this object in the file specified by filename. More...
 
virtual void SavePrimitive (std::ostream &out, Option_t *option="")
 Save a primitive as a C++ statement(s) on output stream "out". More...
 
void SetBit (UInt_t f)
 
void SetBit (UInt_t f, Bool_t set)
 Set or unset the user status bits as specified in f. More...
 
virtual void SetDrawOption (Option_t *option="")
 Set drawing option for object. More...
 
virtual void SetUniqueID (UInt_t uid)
 Set the unique object id. More...
 
virtual void SysError (const char *method, const char *msgfmt,...) const
 Issue system error message. More...
 
R__ALWAYS_INLINE Bool_t TestBit (UInt_t f) const
 
Int_t TestBits (UInt_t f) const
 
virtual void UseCurrentStyle ()
 Set current style settings in this object This function is called when either TCanvas::UseCurrentStyle or TROOT::ForceStyle have been invoked. More...
 
virtual void Warning (const char *method, const char *msgfmt,...) const
 Issue warning message. More...
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0)
 Write this object to the current directory. More...
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0) const
 Write this object to the current directory. More...
 

Private Attributes

Double_t fX
 
Double_t fY
 
Double_t fZ
 

Friends

class TLorentzVector
 

Additional Inherited Members

- Static Public Member Functions inherited from TObject
static Long_t GetDtorOnly ()
 Return destructor only flag. More...
 
static Bool_t GetObjectStat ()
 Get status of object stat flag. More...
 
static void SetDtorOnly (void *obj)
 Set destructor only flag. More...
 
static void SetObjectStat (Bool_t stat)
 Turn on/off tracking of objects in the TObjectTable. More...
 
- Protected Member Functions inherited from TObject
virtual void DoError (int level, const char *location, const char *fmt, va_list va) const
 Interface to ErrorHandler (protected). More...
 
void MakeZombie ()
 

#include <TVector3.h>

Inheritance diagram for TVector3:
[legend]

Member Typedef Documentation

◆ Scalar

Definition at line 26 of file TVector3.h.

Constructor & Destructor Documentation

◆ TVector3() [1/5]

TVector3::TVector3 ( )
inline

Constructors.

Definition at line 247 of file TVector3.h.

◆ TVector3() [2/5]

TVector3::TVector3 ( Double_t  x,
Double_t  y,
Double_t  z 
)
inline

Definition at line 253 of file TVector3.h.

◆ TVector3() [3/5]

TVector3::TVector3 ( const Double_t x0)
inline

Definition at line 256 of file TVector3.h.

◆ TVector3() [4/5]

TVector3::TVector3 ( const Float_t x0)
inline

Definition at line 259 of file TVector3.h.

◆ TVector3() [5/5]

TVector3::TVector3 ( const TVector3 p)
inline

Definition at line 250 of file TVector3.h.

◆ ~TVector3()

virtual TVector3::~TVector3 ( )
inlinevirtual

Definition at line 40 of file TVector3.h.

Member Function Documentation

◆ Angle()

Double_t TVector3::Angle ( const TVector3 q) const

Return the angle w.r.t. another 3-vector.

Definition at line 197 of file TVector3.cxx.

◆ CosTheta()

Double_t TVector3::CosTheta ( ) const
inline

Definition at line 371 of file TVector3.h.

◆ Cross()

TVector3 TVector3::Cross ( const TVector3 p) const
inline

Definition at line 335 of file TVector3.h.

◆ DeltaPhi()

Double_t TVector3::DeltaPhi ( const TVector3 v) const
inline

Definition at line 396 of file TVector3.h.

◆ DeltaR()

Double_t TVector3::DeltaR ( const TVector3 v) const

Return deltaR with respect to v.

Definition at line 372 of file TVector3.cxx.

◆ Dot()

Double_t TVector3::Dot ( const TVector3 p) const
inline

Definition at line 331 of file TVector3.h.

◆ DrEtaPhi()

Double_t TVector3::DrEtaPhi ( const TVector3 v) const
inline

Definition at line 404 of file TVector3.h.

◆ Eta()

Double_t TVector3::Eta ( ) const
inline

Definition at line 400 of file TVector3.h.

◆ EtaPhiVector()

TVector2 TVector3::EtaPhiVector ( ) const
inline

Definition at line 409 of file TVector3.h.

◆ GetXYZ() [1/2]

void TVector3::GetXYZ ( Double_t carray) const
inline

Definition at line 233 of file TVector3.h.

◆ GetXYZ() [2/2]

void TVector3::GetXYZ ( Float_t carray) const
inline

Definition at line 239 of file TVector3.h.

◆ Mag()

Double_t TVector3::Mag ( ) const
inline

Definition at line 86 of file TVector3.h.

◆ Mag2()

Double_t TVector3::Mag2 ( ) const
inline

Definition at line 339 of file TVector3.h.

◆ operator!=()

Bool_t TVector3::operator!= ( const TVector3 v) const
inline

Definition at line 302 of file TVector3.h.

◆ operator()() [1/2]

Double_t & TVector3::operator() ( int  i)
inline

Definition at line 277 of file TVector3.h.

◆ operator()() [2/2]

Double_t TVector3::operator() ( int  i) const
inline

Definition at line 263 of file TVector3.h.

◆ operator*=() [1/2]

TVector3 & TVector3::operator*= ( const TRotation m)

Multiplication operator.

Definition at line 183 of file TVector3.cxx.

◆ operator*=() [2/2]

TVector3 & TVector3::operator*= ( Double_t  a)
inline

Definition at line 324 of file TVector3.h.

◆ operator+=()

TVector3 & TVector3::operator+= ( const TVector3 p)
inline

Definition at line 306 of file TVector3.h.

◆ operator-()

TVector3 TVector3::operator- ( ) const
inline

Definition at line 320 of file TVector3.h.

◆ operator-=()

TVector3 & TVector3::operator-= ( const TVector3 p)
inline

Definition at line 313 of file TVector3.h.

◆ operator=()

TVector3 & TVector3::operator= ( const TVector3 p)
inline

Definition at line 291 of file TVector3.h.

◆ operator==()

Bool_t TVector3::operator== ( const TVector3 v) const
inline

Definition at line 298 of file TVector3.h.

◆ operator[]() [1/2]

Double_t & TVector3::operator[] ( int  i)
inline

Definition at line 210 of file TVector3.h.

◆ operator[]() [2/2]

Double_t TVector3::operator[] ( int  i) const
inline

Definition at line 211 of file TVector3.h.

◆ Orthogonal()

TVector3 TVector3::Orthogonal ( ) const
inline

Definition at line 342 of file TVector3.h.

◆ Perp() [1/2]

Double_t TVector3::Perp ( ) const

Return the transverse component (R in cylindrical coordinate system)

Definition at line 213 of file TVector3.cxx.

◆ Perp() [2/2]

Double_t TVector3::Perp ( const TVector3 p) const

Return the transverse component (R in cylindrical coordinate system)

Definition at line 222 of file TVector3.cxx.

◆ Perp2() [1/2]

Double_t TVector3::Perp2 ( ) const
inline

Definition at line 353 of file TVector3.h.

◆ Perp2() [2/2]

Double_t TVector3::Perp2 ( const TVector3 p) const
inline

Definition at line 358 of file TVector3.h.

◆ Phi()

Double_t TVector3::Phi ( ) const

Return the azimuth angle. Returns phi from -pi to pi.

Definition at line 230 of file TVector3.cxx.

◆ Print()

void TVector3::Print ( Option_t option = "") const
virtual

Print vector parameters.

Reimplemented from TObject.

Definition at line 460 of file TVector3.cxx.

◆ PseudoRapidity()

Double_t TVector3::PseudoRapidity ( ) const

Double_t m = Mag(); return 0.5*log( (m+fZ)/(m-fZ) ); guard against Pt=0.

Definition at line 320 of file TVector3.cxx.

◆ Pt() [1/2]

Double_t TVector3::Pt ( ) const
inline

Definition at line 356 of file TVector3.h.

◆ Pt() [2/2]

Double_t TVector3::Pt ( const TVector3 p) const
inline

Definition at line 367 of file TVector3.h.

◆ Px()

Double_t TVector3::Px ( ) const
inline

Definition at line 219 of file TVector3.h.

◆ Py()

Double_t TVector3::Py ( ) const
inline

Definition at line 220 of file TVector3.h.

◆ Pz()

Double_t TVector3::Pz ( ) const
inline

Definition at line 221 of file TVector3.h.

◆ Rotate()

void TVector3::Rotate ( Double_t  angle,
const TVector3 axis 
)

Rotate vector.

Definition at line 290 of file TVector3.cxx.

◆ RotateUz()

void TVector3::RotateUz ( const TVector3 NewUzVector)

NewUzVector must be normalized !

Definition at line 299 of file TVector3.cxx.

◆ RotateX()

void TVector3::RotateX ( Double_t  angle)

Rotate vector around X.

Definition at line 257 of file TVector3.cxx.

◆ RotateY()

void TVector3::RotateY ( Double_t  angle)

Rotate vector around Y.

Definition at line 268 of file TVector3.cxx.

◆ RotateZ()

void TVector3::RotateZ ( Double_t  angle)

Rotate vector around Z.

Definition at line 279 of file TVector3.cxx.

◆ SetMag()

void TVector3::SetMag ( Double_t  ma)
inline

Definition at line 376 of file TVector3.h.

◆ SetMagThetaPhi()

void TVector3::SetMagThetaPhi ( Double_t  mag,
Double_t  theta,
Double_t  phi 
)

Setter with mag, theta, phi.

Definition at line 382 of file TVector3.cxx.

◆ SetPerp()

void TVector3::SetPerp ( Double_t  r)
inline

Definition at line 388 of file TVector3.h.

◆ SetPhi()

void TVector3::SetPhi ( Double_t  ph)

Set phi keeping mag and theta constant (BaBar).

Definition at line 362 of file TVector3.cxx.

◆ SetPtEtaPhi()

void TVector3::SetPtEtaPhi ( Double_t  pt,
Double_t  eta,
Double_t  phi 
)

Set Pt, Eta and Phi.

Definition at line 332 of file TVector3.cxx.

◆ SetPtThetaPhi()

void TVector3::SetPtThetaPhi ( Double_t  pt,
Double_t  theta,
Double_t  phi 
)

Set Pt, Theta and Phi.

Definition at line 340 of file TVector3.cxx.

◆ SetTheta()

void TVector3::SetTheta ( Double_t  th)

Set theta keeping mag and phi constant (BaBar).

Definition at line 350 of file TVector3.cxx.

◆ SetX()

void TVector3::SetX ( Double_t  xx)
inline

Definition at line 223 of file TVector3.h.

◆ SetXYZ()

void TVector3::SetXYZ ( Double_t  x,
Double_t  y,
Double_t  z 
)
inline

Definition at line 227 of file TVector3.h.

◆ SetY()

void TVector3::SetY ( Double_t  yy)
inline

Definition at line 224 of file TVector3.h.

◆ SetZ()

void TVector3::SetZ ( Double_t  zz)
inline

Definition at line 225 of file TVector3.h.

◆ Theta()

Double_t TVector3::Theta ( ) const

Return the polar angle.

Definition at line 238 of file TVector3.cxx.

◆ Transform()

TVector3 & TVector3::Transform ( const TRotation m)

Transform this vector with a TRotation.

Definition at line 190 of file TVector3.cxx.

◆ Unit()

TVector3 TVector3::Unit ( ) const

Return unit vector parallel to this.

Definition at line 246 of file TVector3.cxx.

◆ x()

Double_t TVector3::x ( ) const
inline

Definition at line 213 of file TVector3.h.

◆ X()

Double_t TVector3::X ( ) const
inline

Definition at line 216 of file TVector3.h.

◆ XYvector()

TVector2 TVector3::XYvector ( ) const
inline

Definition at line 413 of file TVector3.h.

◆ y()

Double_t TVector3::y ( ) const
inline

Definition at line 214 of file TVector3.h.

◆ Y()

Double_t TVector3::Y ( ) const
inline

Definition at line 217 of file TVector3.h.

◆ z()

Double_t TVector3::z ( ) const
inline

Definition at line 215 of file TVector3.h.

◆ Z()

Double_t TVector3::Z ( ) const
inline

Definition at line 218 of file TVector3.h.

Friends And Related Function Documentation

◆ TLorentzVector

friend class TLorentzVector
friend

Definition at line 191 of file TVector3.h.

Member Data Documentation

◆ fX

Double_t TVector3::fX
private

Definition at line 185 of file TVector3.h.

◆ fY

Double_t TVector3::fY
private

Definition at line 185 of file TVector3.h.

◆ fZ

Double_t TVector3::fZ
private

Definition at line 185 of file TVector3.h.

Libraries for TVector3:
[legend]

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