|
HepMC Reference DocumentationHepMC |
#include <Polarization.h>
Public Member Functions | |
| Polarization () | |
| default constructor | |
| Polarization (double theta, double phi=0) | |
| constructor requiring at least one value | |
| Polarization (const Polarization &inpolar) | |
| construct from another polarization object | |
| Polarization (const ThreeVector &vec3in) | |
| construct using the polar and azimuthal angles from a ThreeVector | |
| virtual | ~Polarization () |
| void | swap (Polarization &other) |
| swap | |
| Polarization & | operator= (const Polarization &inpolar) |
| make a copy | |
| bool | operator== (const Polarization &) const |
| equality requires that theta and phi are equal | |
| bool | operator!= (const Polarization &) const |
| inequality results if either theta or phi differ | |
| void | print (std::ostream &ostr=std::cout) const |
| print theta and phi | |
| double | theta () const |
| returns polar angle in radians | |
| double | phi () const |
| returns azimuthal angle in radians | |
| ThreeVector | normal3d () const |
| unit 3 vector for easy manipulation | |
| bool | is_defined () const |
| returns true if the Polarization has been defined | |
| double | set_theta (double theta) |
| set polar angle in radians | |
| double | set_phi (double phi) |
| set azimuthal angle in radians | |
| void | set_theta_phi (double theta, double phi) |
| set both polar and azimuthal angles in radians | |
| ThreeVector | set_normal3d (const ThreeVector &vec3in) |
| sets polarization according to direction of 3 vec | |
| void | set_undefined () |
| declares the Polarization as undefined and zeros the values | |
Friends | |
| std::ostream & | operator<< (std::ostream &, const Polarization &) |
| print polarization information | |
HepMC::Polarization stores a particle's theta and phi in radians. Use of this information is optional. By default, the polarization is set to zero.
Definition at line 29 of file Polarization.h.
| HepMC::Polarization::Polarization | ( | ) |
| HepMC::Polarization::Polarization | ( | double | theta, | |
| double | phi = 0 | |||
| ) |
| HepMC::Polarization::Polarization | ( | const Polarization & | inpolar | ) |
| HepMC::Polarization::Polarization | ( | const ThreeVector & | vec3in | ) |
construct using the polar and azimuthal angles from a ThreeVector
Definition at line 29 of file Polarization.cc.
| virtual HepMC::Polarization::~Polarization | ( | ) | [inline, virtual] |
Definition at line 43 of file Polarization.h.
| bool HepMC::Polarization::is_defined | ( | ) | const |
returns true if the Polarization has been defined
Definition at line 77 of file Polarization.cc.
Referenced by operator==().
| ThreeVector HepMC::Polarization::normal3d | ( | ) | const |
unit 3 vector for easy manipulation
Definition at line 57 of file Polarization.cc.
References phi(), HepMC::ThreeVector::setPhi(), HepMC::ThreeVector::setTheta(), and theta().
| bool HepMC::Polarization::operator!= | ( | const Polarization & | ) | const [inline] |
| Polarization & HepMC::Polarization::operator= | ( | const Polarization & | inpolar | ) |
make a copy
best practices implementation
Definition at line 42 of file Polarization.cc.
References swap().
| bool HepMC::Polarization::operator== | ( | const Polarization & | ) | const [inline] |
equality requires that theta and phi are equal
Definition at line 99 of file Polarization.h.
References is_defined(), phi(), and theta().
| double HepMC::Polarization::phi | ( | ) | const [inline] |
returns azimuthal angle in radians
Definition at line 93 of file Polarization.h.
Referenced by normal3d(), HepMC::operator<<(), and operator==().
| void HepMC::Polarization::print | ( | std::ostream & | ostr = std::cout |
) | const |
| ThreeVector HepMC::Polarization::set_normal3d | ( | const ThreeVector & | vec3in | ) |
sets polarization according to direction of 3 vec
Definition at line 93 of file Polarization.cc.
References HepMC::ThreeVector::phi(), set_phi(), set_theta(), and HepMC::ThreeVector::theta().
| double HepMC::Polarization::set_phi | ( | double | phi | ) |
set azimuthal angle in radians
Phi is restricted to be between 0 --> 2pi if an out of range value is given, it is translated to this range.
Definition at line 71 of file Polarization.cc.
Referenced by set_normal3d(), and set_theta_phi().
| double HepMC::Polarization::set_theta | ( | double | theta | ) |
set polar angle in radians
Theta is restricted to be between 0 --> pi if an out of range value is given, it is translated to this range.
Definition at line 65 of file Polarization.cc.
Referenced by set_normal3d(), and set_theta_phi().
| void HepMC::Polarization::set_theta_phi | ( | double | theta, | |
| double | phi | |||
| ) |
set both polar and azimuthal angles in radians
Definition at line 87 of file Polarization.cc.
References set_phi(), and set_theta().
| void HepMC::Polarization::set_undefined | ( | ) |
declares the Polarization as undefined and zeros the values
Definition at line 81 of file Polarization.cc.
| void HepMC::Polarization::swap | ( | Polarization & | other | ) |
swap
Definition at line 35 of file Polarization.cc.
References m_defined, m_phi, and m_theta.
Referenced by operator=(), and HepMC::GenParticle::swap().
| double HepMC::Polarization::theta | ( | ) | const [inline] |
returns polar angle in radians
Definition at line 92 of file Polarization.h.
Referenced by normal3d(), HepMC::operator<<(), and operator==().
| std::ostream& operator<< | ( | std::ostream & | ostr, | |
| const Polarization & | polar | |||
| ) | [friend] |
1.4.7