Jpp 21.0.0
the software that should make you happy
Loading...
Searching...
No Matches
JPHYSICS::JColorFactor Struct Reference

Auxiliary class for color factors of SM fields. More...

#include <JCharges.hh>

Public Types

enum  JColorFactor_t { ONE = 1 , THREE = 3 , EIGHT = 8 }
 Enumeration of SM field color factors. More...
 

Public Member Functions

 JColorFactor (const JColorFactor_t &C)
 Constructor.
 
template<typename T , std::enable_if_t< std::is_integral_v< T >, bool > = true>
 JColorFactor (const T C)
 Constructor.
 
 operator int () const
 Conversion operator.
 

Public Attributes

JColorFactor_t C
 Color factor.
 

Detailed Description

Auxiliary class for color factors of SM fields.

Definition at line 315 of file JCharges.hh.

Member Enumeration Documentation

◆ JColorFactor_t

Enumeration of SM field color factors.

Enumerator
ONE 

leptons, weak bosons, photon

THREE 

quarks

EIGHT 

gluon

Definition at line 320 of file JCharges.hh.

320 {
321 ONE = 1, //!< leptons, weak bosons, photon
322 THREE = 3, //!< quarks
323 EIGHT = 8 //!< gluon
324 };
@ ONE
leptons, weak bosons, photon
Definition JCharges.hh:321

Constructor & Destructor Documentation

◆ JColorFactor() [1/2]

JPHYSICS::JColorFactor::JColorFactor ( const JColorFactor_t & C)
inline

Constructor.

Parameters
Ccolor factor

Definition at line 332 of file JCharges.hh.

332 :
333 C(C)
334 {}
JColorFactor_t C
Color factor.
Definition JCharges.hh:368

◆ JColorFactor() [2/2]

template<typename T , std::enable_if_t< std::is_integral_v< T >, bool > = true>
JPHYSICS::JColorFactor::JColorFactor ( const T C)
inline

Constructor.

Parameters
Ccolor factor

Definition at line 343 of file JCharges.hh.

344 {
345 switch (C) {
346 case ONE:
347 case THREE:
348 case EIGHT:
349 this->C = static_cast<JColorFactor_t>(C);
350 break;
351 default:
352 THROW(JValueOutOfRange, "JColorFactor::JColorFactor(): Invalid color factor " << C);
353 }
354 }
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
JColorFactor_t
Enumeration of SM field color factors.
Definition JCharges.hh:320

Member Function Documentation

◆ operator int()

JPHYSICS::JColorFactor::operator int ( ) const
inline

Conversion operator.

Returns
color factor

Definition at line 362 of file JCharges.hh.

363 {
364 return this->C;
365 }

Member Data Documentation

◆ C

JColorFactor_t JPHYSICS::JColorFactor::C

Color factor.

Definition at line 368 of file JCharges.hh.


The documentation for this struct was generated from the following file: