PARTONS  
PARtonic Tomography Of Nucleon Software
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
PARTONS::PolarizationType Class Reference

Definition of enumeration values for meson polarization state. More...

Public Types

enum  Type {
  UNDEFINED = 0 , LIN_LONG_PLUS = 1 , LIN_LONG_MINUS = 2 , LIN_TRANS_X_PLUS = 3 ,
  LIN_TRANS_X_MINUS = 4 , LIN_TRANS_Y_PLUS = 5 , LIN_TRANS_Y_MINUS = 6 , CIR_L = 7 ,
  CIR_R = 8
}
 Definition of enumerate values corresponding to meson polarization state. More...
 

Public Member Functions

 PolarizationType ()
 Default constructor. More...
 
 PolarizationType (Type type)
 Assignment constructor. More...
 
 PolarizationType (const PolarizationType &other)
 Copy constructor. More...
 
 operator Type () const
 Automatic cast to enum. More...
 
std::string toString () const
 Get string representation of type being assigned to a declared object of this class. More...
 
void serialize (ElemUtils::Packet &packet) const
 Serialize into given Packet. More...
 
void unserialize (ElemUtils::Packet &packet)
 Retrieve data from given Packet. More...
 
bool operator< (const PolarizationType &other) const
 Relation operator that checks if the value of left operand is less than the value of right operand (based on values assigned in the definition of PolarizationType::Type). More...
 
PolarizationType::Type getType () const
 Get type being assigned to a declared object of this class. More...
 
void setType (Type type)
 Assign type to a declared object of this class. More...
 
double pol_vectors_product (PolarizationType::Type Pol1, PolarizationType::Type Pol2)
 
double pol_projected_on_x (PolarizationType::Type Pol)
 

Static Public Member Functions

static PolarizationType::Type fromString (const std::string &polarizationTypeStr)
 Try to match meson polarization from given string. More...
 

Private Attributes

PolarizationType::Type m_type
 Type associated to a declared object of this class. More...
 

Detailed Description

Definition of enumeration values for meson polarization state.

This class defines a set of enumeration values that are used to distinguish between meson polarization state. In addition, a declared object of this class is always associated to one meson type (see PolarizationType::m_type), so member functions can act on it.

Member Enumeration Documentation

◆ Type

Definition of enumerate values corresponding to meson polarization state.

Enumerator
UNDEFINED 

Undefined type.

LIN_LONG_PLUS 

Linear longitudinal (along z-axis) +.

LIN_LONG_MINUS 

Linear longitudinal (along z-axis) -.

LIN_TRANS_X_PLUS 

Linear transverse (along x-axis) +.

LIN_TRANS_X_MINUS 

Linear transverse (along x-axis) -.

LIN_TRANS_Y_PLUS 

Linear transverse (along y-axis) +.

LIN_TRANS_Y_MINUS 

Linear transverse (along y-axis)-+.

CIR_L 

Circular left.

CIR_R 

Circular right.

Constructor & Destructor Documentation

◆ PolarizationType() [1/3]

PARTONS::PolarizationType::PolarizationType ( )

Default constructor.

◆ PolarizationType() [2/3]

PARTONS::PolarizationType::PolarizationType ( Type  type)

Assignment constructor.

Parameters
typeType to be assigned.

◆ PolarizationType() [3/3]

PARTONS::PolarizationType::PolarizationType ( const PolarizationType &  other)

Copy constructor.

Parameters
otherObject to be copied.

Member Function Documentation

◆ fromString()

PolarizationType::Type PARTONS::PolarizationType::fromString ( const std::string &  polarizationTypeStr)
static

Try to match meson polarization from given string.

Parameters
polarizationTypeStrString to be matched.
Returns
Matched type or PolarizationType::UNDEFINED if unable to match.

◆ getType()

PolarizationType::Type PARTONS::PolarizationType::getType ( ) const

Get type being assigned to a declared object of this class.

◆ operator Type()

PARTONS::PolarizationType::operator PolarizationType::Type ( ) const

Automatic cast to enum.

◆ operator<()

bool PARTONS::PolarizationType::operator< ( const PolarizationType &  other) const

Relation operator that checks if the value of left operand is less than the value of right operand (based on values assigned in the definition of PolarizationType::Type).

Used by std::sort function.

Parameters
otherRight hand value.
Returns
True if the value of left operand is less than the value of right operand, otherwise false.

◆ pol_projected_on_x()

double PARTONS::PolarizationType::pol_projected_on_x ( PolarizationType::Type  Pol)
inline

◆ pol_vectors_product()

double PARTONS::PolarizationType::pol_vectors_product ( PolarizationType::Type  Pol1,
PolarizationType::Type  Pol2 
)
inline

◆ serialize()

void PARTONS::PolarizationType::serialize ( ElemUtils::Packet &  packet) const

Serialize into given Packet.

Parameters
packetTarget Packet.

◆ setType()

void PARTONS::PolarizationType::setType ( Type  type)

Assign type to a declared object of this class.

◆ toString()

std::string PARTONS::PolarizationType::toString ( ) const

Get string representation of type being assigned to a declared object of this class.

Returns
String representation of assigned type.

◆ unserialize()

void PARTONS::PolarizationType::unserialize ( ElemUtils::Packet &  packet)

Retrieve data from given Packet.

Parameters
packetInput Packet.

Member Data Documentation

◆ m_type

PolarizationType::Type PARTONS::PolarizationType::m_type
private

Type associated to a declared object of this class.


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