ATLAS Offline Software
Loading...
Searching...
No Matches
StringVector Class Reference

#include <StringVector.h>

Collaboration diagram for StringVector:

Public Member Functions

 StringVector ()=default
 StringVector (StringVector &&)=default
 StringVector (const StringVector &)=default
StringVectoroperator= (StringVector &&)=default
StringVectoroperator= (const StringVector &)=default
 StringVector (const G4ThreeVector &p, G4double m)
 StringVector (G4double x, G4double y, G4double z, G4double m)
 ~StringVector ()=default
G4ThreeVector vect () const
G4double mag () const
G4double x () const
G4double y () const
G4double z () const
G4double t () const
G4LorentzVector lv () const
StringVector reflect (const G4LorentzVector &axis) const
void set (const G4ThreeVector &p, G4double m)
void set (G4double x, G4double y, G4double z, G4double m)
void operator*= (G4double a)

Private Attributes

G4ThreeVector m_p {0,0,0}
G4double m_m {}

Detailed Description

Definition at line 11 of file StringVector.h.

Constructor & Destructor Documentation

◆ StringVector() [1/5]

StringVector::StringVector ( )
default

◆ StringVector() [2/5]

StringVector::StringVector ( StringVector && )
default

◆ StringVector() [3/5]

StringVector::StringVector ( const StringVector & )
default

◆ StringVector() [4/5]

StringVector::StringVector ( const G4ThreeVector & p,
G4double m )

Definition at line 7 of file StringVector.cxx.

7: m_p(p), m_m(m) {}
G4double m_m
G4ThreeVector m_p

◆ StringVector() [5/5]

StringVector::StringVector ( G4double x,
G4double y,
G4double z,
G4double m )

Definition at line 8 of file StringVector.cxx.

8: m_p(x,y,z), m_m(m) {}
G4double x() const
G4double z() const
G4double y() const

◆ ~StringVector()

StringVector::~StringVector ( )
default

Member Function Documentation

◆ lv()

G4LorentzVector StringVector::lv ( ) const
inline

Definition at line 70 of file StringVector.h.

70 {
71 return G4LorentzVector(m_p, t());
72}
G4double t() const

◆ mag()

G4double StringVector::mag ( ) const
inline

Definition at line 50 of file StringVector.h.

50 {
51 return m_m;
52}

◆ operator*=()

void StringVector::operator*= ( G4double a)
inline

Definition at line 88 of file StringVector.h.

88 {
89 m_p *= a;
90 m_m *= a;
91}
static Double_t a

◆ operator=() [1/2]

StringVector & StringVector::operator= ( const StringVector & )
default

◆ operator=() [2/2]

StringVector & StringVector::operator= ( StringVector && )
default

◆ reflect()

StringVector StringVector::reflect ( const G4LorentzVector & axis) const
inline

Definition at line 74 of file StringVector.h.

74 {
75 return StringVector(axis.vect() * (2 * lv() * axis) / axis.mag2() - m_p, m_m);
76}
StringVector()=default
G4LorentzVector lv() const

◆ set() [1/2]

void StringVector::set ( const G4ThreeVector & p,
G4double m )
inline

Definition at line 78 of file StringVector.h.

◆ set() [2/2]

void StringVector::set ( G4double x,
G4double y,
G4double z,
G4double m )
inline

Definition at line 83 of file StringVector.h.

83 {
84 m_p.set(x,y,z);
85 m_m = m;
86}

◆ t()

G4double StringVector::t ( ) const
inline

Definition at line 66 of file StringVector.h.

66 {
67 return std::sqrt(m_p.mag2() + m_m*m_m);
68}

◆ vect()

G4ThreeVector StringVector::vect ( ) const
inline

Definition at line 46 of file StringVector.h.

46 {
47 return m_p;
48}

◆ x()

G4double StringVector::x ( ) const
inline

Definition at line 54 of file StringVector.h.

54 {
55 return m_p.x();
56}

◆ y()

G4double StringVector::y ( ) const
inline

Definition at line 58 of file StringVector.h.

58 {
59 return m_p.y();
60}

◆ z()

G4double StringVector::z ( ) const
inline

Definition at line 62 of file StringVector.h.

62 {
63 return m_p.z();
64}

Member Data Documentation

◆ m_m

G4double StringVector::m_m {}
private

Definition at line 35 of file StringVector.h.

35{};

◆ m_p

G4ThreeVector StringVector::m_p {0,0,0}
private

Definition at line 34 of file StringVector.h.

34{0,0,0};

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