Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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);

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.);

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
double Double_t
Definition RtypesCore.h:59
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

Angle between two vectors

Double_t a = v1.Angle(v2);
#define a(i)
Definition RSha256.hxx:99

Rotations

Rotation around axes

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

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
TVector3 Unit() const
Return unit vector parallel to this.
Definition TVector3.cxx:246
void RotateUz(const TVector3 &)
NewUzVector must be normalized !
Definition TVector3.cxx:299

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.
 
 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.
 
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.
 
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.
 
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)
 
Double_t Perp (const TVector3 &) const
 Return the transverse component (R in cylindrical coordinate system)
 
Double_t Perp2 () const
 
Double_t Perp2 (const TVector3 &) const
 
Double_t Phi () const
 Return the azimuth angle. Returns phi from -pi to pi.
 
void Print (Option_t *option="") const
 Print vector parameters.
 
Double_t PseudoRapidity () const
 Double_t m = Mag(); return 0.5*log( (m+fZ)/(m-fZ) ); guard against Pt=0.
 
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.
 
void RotateUz (const TVector3 &)
 NewUzVector must be normalized !
 
void RotateX (Double_t)
 Rotate vector around X.
 
void RotateY (Double_t)
 Rotate vector around Y.
 
void RotateZ (Double_t)
 Rotate vector around Z.
 
void SetMag (Double_t)
 
void SetMagThetaPhi (Double_t mag, Double_t theta, Double_t phi)
 Setter with mag, theta, phi.
 
void SetPerp (Double_t)
 
void SetPhi (Double_t)
 Set phi keeping mag and theta constant (BaBar).
 
void SetPtEtaPhi (Double_t pt, Double_t eta, Double_t phi)
 Set Pt, Eta and Phi.
 
void SetPtThetaPhi (Double_t pt, Double_t theta, Double_t phi)
 Set Pt, Theta and Phi.
 
void SetTheta (Double_t)
 Set theta keeping mag and phi constant (BaBar).
 
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.
 
TVector3Transform (const TRotation &)
 Transform this vector with a TRotation.
 
TVector3 Unit () const
 Return unit vector parallel to this.
 
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.
 
 TObject (const TObject &object)
 TObject copy ctor.
 
virtual ~TObject ()
 TObject destructor.
 
void AbstractMethod (const char *method) const
 Use this method to implement an "abstract" method that you don't want to leave purely abstract.
 
virtual void AppendPad (Option_t *option="")
 Append graphics object to current pad.
 
virtual void Browse (TBrowser *b)
 Browse object. May be overridden for another default action.
 
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.
 
virtual const char * ClassName () const
 Returns name of class to which the object belongs.
 
virtual void Clear (Option_t *="")
 
virtual TObjectClone (const char *newname="") const
 Make a clone of an object using the Streamer facility.
 
virtual Int_t Compare (const TObject *obj) const
 Compare abstract method.
 
virtual void Copy (TObject &object) const
 Copy this to obj.
 
virtual void Delete (Option_t *option="")
 Delete this object.
 
virtual Int_t DistancetoPrimitive (Int_t px, Int_t py)
 Computes distance from point (px,py) to the object.
 
virtual void Draw (Option_t *option="")
 Default Draw method for all objects.
 
virtual void DrawClass () const
 Draw class inheritance tree of the class to which this object belongs.
 
virtual TObjectDrawClone (Option_t *option="") const
 Draw a clone of this object in the current selected pad for instance with: gROOT->SetSelectedPad(gPad).
 
virtual void Dump () const
 Dump contents of object on stdout.
 
virtual void Error (const char *method, const char *msgfmt,...) const
 Issue error message.
 
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.
 
virtual void Execute (TMethod *method, TObjArray *params, Int_t *error=0)
 Execute method on this object with parameters stored in the TObjArray.
 
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 Execute action corresponding to an event at (px,py).
 
virtual void Fatal (const char *method, const char *msgfmt,...) const
 Issue fatal error message.
 
virtual TObjectFindObject (const char *name) const
 Must be redefined in derived classes.
 
virtual TObjectFindObject (const TObject *obj) const
 Must be redefined in derived classes.
 
virtual Option_tGetDrawOption () const
 Get option used by the graphics system to draw this object.
 
virtual const char * GetIconName () const
 Returns mime type name of object.
 
virtual const char * GetName () const
 Returns name of object.
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 Returns string containing info about the object at position (px,py).
 
virtual Option_tGetOption () const
 
virtual const char * GetTitle () const
 Returns title of object.
 
virtual UInt_t GetUniqueID () const
 Return the unique object id.
 
virtual Bool_t HandleTimer (TTimer *timer)
 Execute action in response of a timer timing out.
 
virtual ULong_t Hash () const
 Return hash value for this object.
 
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.
 
virtual void Info (const char *method, const char *msgfmt,...) const
 Issue info message.
 
virtual Bool_t InheritsFrom (const char *classname) const
 Returns kTRUE if object inherits from class "classname".
 
virtual Bool_t InheritsFrom (const TClass *cl) const
 Returns kTRUE if object inherits from TClass cl.
 
virtual void Inspect () const
 Dump contents of this object in a graphics canvas.
 
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).
 
virtual Bool_t IsFolder () const
 Returns kTRUE in case object contains browsable objects (like containers or lists of other objects).
 
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.
 
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).
 
virtual Bool_t Notify ()
 This method must be overridden to handle object notification.
 
void Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const
 Use this method to declare a method obsolete.
 
void operator delete (void *ptr)
 Operator delete.
 
void operator delete[] (void *ptr)
 Operator delete [].
 
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.
 
virtual void Paint (Option_t *option="")
 This method must be overridden if a class wants to paint itself.
 
virtual void Pop ()
 Pop on object drawn in a pad to the top of the display list.
 
virtual Int_t Read (const char *name)
 Read contents of object with specified name from the current directory.
 
virtual void RecursiveRemove (TObject *obj)
 Recursively remove this object from a list.
 
void ResetBit (UInt_t f)
 
virtual void SaveAs (const char *filename="", Option_t *option="") const
 Save this object in the file specified by filename.
 
virtual void SavePrimitive (std::ostream &out, Option_t *option="")
 Save a primitive as a C++ statement(s) on output stream "out".
 
void SetBit (UInt_t f)
 
void SetBit (UInt_t f, Bool_t set)
 Set or unset the user status bits as specified in f.
 
virtual void SetDrawOption (Option_t *option="")
 Set drawing option for object.
 
virtual void SetUniqueID (UInt_t uid)
 Set the unique object id.
 
virtual void SysError (const char *method, const char *msgfmt,...) const
 Issue system error message.
 
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.
 
virtual void Warning (const char *method, const char *msgfmt,...) const
 Issue warning message.
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0)
 Write this object to the current directory.
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0) const
 Write this object to the current directory.
 

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.
 
static Bool_t GetObjectStat ()
 Get status of object stat flag.
 
static void SetDtorOnly (void *obj)
 Set destructor only flag.
 
static void SetObjectStat (Bool_t stat)
 Turn on/off tracking of objects in the TObjectTable.
 
- Protected Types inherited from TObject
enum  { kOnlyPrepStep = BIT(3) }
 
- 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).
 
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 Symbol 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:

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