StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Friends | List of all members
HepMC::Polarization Class Reference

The Polarization class stores theta and phi for a GenParticle. More...

#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
 
void swap (Polarization &other)
 swap
 
Polarizationoperator= (const Polarization &inpolar)
 make a copy More...
 
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 More...
 
double set_phi (double phi)
 set azimuthal angle in radians More...
 
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
 

Detailed Description

The Polarization class stores theta and phi for a GenParticle.

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.

Member Function Documentation

Polarization & HepMC::Polarization::operator= ( const Polarization inpolar)

make a copy

best practices implementation

Definition at line 42 of file Polarization.cc.

References swap().

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


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