cepgen is hosted by Hepforge, IPPP Durham
CepGen N/A
Central exclusive processes event generator

Kinematic information for one particle. More...

#include <include/CepGen/Event/Particle.h>

+ Collaboration diagram for Particle:

Public Types

enum class  Status {
  PrimordialIncoming = -9 , DebugResonance = -5 , Resonance = -4 , Fragmented = -3 ,
  Propagator = -2 , Incoming = -1 , Undefined = 0 , FinalState = 1 ,
  Undecayed = 2 , Unfragmented = 3
}
 Internal status code for a particle. More...
 
enum class  Role {
  UnknownRole = -1 , IncomingBeam1 = 1 , IncomingBeam2 = 2 , OutgoingBeam1 = 3 ,
  OutgoingBeam2 = 5 , CentralSystem = 6 , Intermediate = 4 , Parton1 = 41 ,
  Parton2 = 42
}
 

Public Member Functions

 Particle (Role role=Role::UnknownRole, pdgid_t id=0, Status status=Status::Undefined)
 Build using the role of the particle in the process and its PDG id.
 
bool operator< (const Particle &) const
 Comparison operator (from unique identifier)
 
bool operator== (const Particle &) const
 Equality operator.
 
int id () const
 Unique identifier (in a Event object context) Set the particle unique identifier in an event.
 
ParticlesetId (int id)
 
float charge () const
 Electric charge (given as a float number, for the quarks and bound states) Set whether we are coping with the particle or its antiparticle.
 
ParticlesetAntiparticle (bool anti)
 
Role role () const
 Role in the considered process Set the particle role in the process.
 
ParticlesetRole (const Role &role)
 
Status status () const
 Particle status Set the particle decay/stability status.
 
ParticlesetStatus (Status status)
 
ParticlesetStatus (int status)
 Set the particle decay/stability status.
 
ParticlesetPdgId (pdgid_t pdg, short charge_factor=0)
 Set the PDG identifier (along with the particle's electric charge)
 
pdgid_t pdgId () const
 Retrieve the objectified PDG identifier Set the PDG identifier (along with the particle's electric charge)
 
ParticlesetIntegerPdgId (long pdg_id)
 
long integerPdgId () const
 Retrieve the integer value of the PDG identifier.
 
float helicity () const
 Particle's helicity Set the helicity of the particle.
 
ParticlesetHelicity (float heli)
 
Momentummomentum ()
 Retrieve the momentum object associated with this particle Retrieve the momentum object associated with this particle.
 
const Momentummomentum () const
 
ParticlesetMomentum (const Momentum &, bool off_shell=false)
 Associate a momentum object with this particle.
 
ParticlesetMomentum (double px, double py, double pz, double energy=-1.)
 Set the 3- or 4-momentum associated with the particle.
 
ParticlesetMomentum (double p[4])
 Set the 4-momentum associated with the particle.
 
bool valid () const
 Is this particle a valid particle which can be used for kinematic computations?
 
bool primary () const
 Is this particle a primary particle?
 
ParticleaddMother (Particle &mother_particle)
 Set the mother particle.
 
ParticlesIds mothers () const
 Identifier to the mother particles.
 
ParticlesIdsmothers ()
 Identifier to the mother particles.
 
ParticleaddChild (Particle &child_particle)
 Add a decay product.
 
ParticlesIds children () const
 Identifiers list of all child particles.
 
ParticlesIdschildren ()
 Identifiers list of all child particles.
 

Protected Attributes

int id_ {-1}
 Unique identifier in an event.
 
bool antiparticle_ {false}
 Are we dealing with the particle or antiparticle?
 
Momentum momentum_
 Momentum properties handler.
 
float helicity_ {0.}
 Helicity.
 
Role role_ {Role::UnknownRole}
 Role in the process.
 
int status_ {static_cast<int>(Status::Undefined)}
 Decay/stability status.
 
ParticlesIds mothers_ {}
 List of mother particles.
 
ParticlesIds children_ {}
 List of child particles.
 
pdgid_t pdg_id_ {0}
 PDG id.
 

Friends

std::ostream & operator<< (std::ostream &os, const Status &)
 Human-readable particle's status Role of the particle in the process.
 
std::ostream & operator<< (std::ostream &os, const Role &)
 Human-readable particle's role in the event.
 
std::ostream & operator<< (std::ostream &, const Particle &)
 Human-readable dump of particle information.
 

Detailed Description

Definition at line 32 of file Particle.h.

Member Enumeration Documentation

◆ Role

enum class Role
strong
Enumerator
UnknownRole 

Undefined role.

IncomingBeam1 

\(z>0\) incoming beam particle

IncomingBeam2 

\(z<0\) incoming beam particle

OutgoingBeam1 

\(z<0\) outgoing beam state/particle

OutgoingBeam2 

\(z>0\) outgoing beam state/particle

CentralSystem 

Central particles system.

Intermediate 

Intermediate two-parton system.

Parton1 

\(z>0\) beam incoming parton

Parton2 

\(z<0\) beam incoming parton

Definition at line 49 of file Particle.h.

◆ Status

enum class Status
strong
Enumerator
PrimordialIncoming 

Incoming beam particle.

DebugResonance 

Intermediate resonance (for processes developers)

Resonance 

Already decayed intermediate resonance.

Fragmented 

Already fragmented outgoing beam.

Propagator 

Generic propagator.

Incoming 

Incoming parton.

Undefined 

Undefined particle.

FinalState 

Stable, final state particle.

Undecayed 

Particle to be decayed externally.

Unfragmented 

Particle to be hadronised externally.

Definition at line 35 of file Particle.h.

Constructor & Destructor Documentation

◆ Particle()

Particle ( Role role = Role::UnknownRole,
pdgid_t id = 0,
Status status = Status::Undefined )
explicit
Parameters
[in]roleRole of the particle in the process
[in]idPDG identifier
[in]statusCurrent status

Member Function Documentation

◆ addChild()

Particle & addChild ( Particle & child_particle)

◆ addMother()

Particle & addMother ( Particle & mother_particle)

◆ charge()

float charge ( ) const

◆ children() [1/2]

ParticlesIds & children ( )

Definition at line 147 of file Particle.h.

◆ children() [2/2]

ParticlesIds children ( ) const

Definition at line 146 of file Particle.h.

◆ helicity()

float helicity ( ) const

Definition at line 115 of file Particle.h.

◆ id()

int id ( ) const

Definition at line 75 of file Particle.h.

◆ integerPdgId()

long integerPdgId ( ) const

◆ momentum() [1/2]

Momentum & momentum ( )

Definition at line 122 of file Particle.h.

◆ momentum() [2/2]

const Momentum & momentum ( ) const

Definition at line 124 of file Particle.h.

◆ mothers() [1/2]

ParticlesIds & mothers ( )

Definition at line 144 of file Particle.h.

◆ mothers() [2/2]

ParticlesIds mothers ( ) const

Definition at line 143 of file Particle.h.

◆ operator<()

bool operator< ( const Particle & ) const

◆ operator==()

bool operator== ( const Particle & ) const

◆ pdgId()

pdgid_t pdgId ( ) const
Parameters
[in]pdg_idPDG identifier (incl. electric charge in e)

◆ primary()

bool primary ( ) const

Definition at line 141 of file Particle.h.

◆ role()

Role role ( ) const

Definition at line 87 of file Particle.h.

◆ setAntiparticle()

Particle & setAntiparticle ( bool anti)

Definition at line 83 of file Particle.h.

◆ setHelicity()

Particle & setHelicity ( float heli)

Definition at line 117 of file Particle.h.

◆ setId()

Particle & setId ( int id)

Definition at line 77 of file Particle.h.

◆ setIntegerPdgId()

Particle & setIntegerPdgId ( long pdg_id)

◆ setMomentum() [1/3]

Particle & setMomentum ( const Momentum & ,
bool off_shell = false )
Parameters
[in]off_shellallow the 4-momentum mass to compensate for E-p balance?

◆ setMomentum() [2/3]

Particle & setMomentum ( double p[4])
Parameters
[in]p4-momentum

Definition at line 136 of file Particle.h.

◆ setMomentum() [3/3]

Particle & setMomentum ( double px,
double py,
double pz,
double energy = -1. )
Parameters
[in]pxMomentum along the \(x\)-axis, in GeV/c
[in]pyMomentum along the \(y\)-axis, in GeV/c
[in]pzMomentum along the \(z\)-axis, in GeV/c
[in]energyEnergy, in GeV

◆ setPdgId()

Particle & setPdgId ( pdgid_t pdg,
short charge_factor = 0 )
Parameters
[in]pdgPDG identifier
[in]charge_factorElectric charge (0, 1, or -1)

◆ setRole()

Particle & setRole ( const Role & role)

Definition at line 89 of file Particle.h.

◆ setStatus() [1/2]

Particle & setStatus ( int status)

Definition at line 100 of file Particle.h.

◆ setStatus() [2/2]

Particle & setStatus ( Status status)

Definition at line 95 of file Particle.h.

◆ status()

Status status ( ) const

Definition at line 93 of file Particle.h.

◆ valid()

bool valid ( ) const

Friends And Related Symbol Documentation

◆ operator<< [1/3]

std::ostream & operator<< ( std::ostream & ,
const Particle &  )
friend

◆ operator<< [2/3]

std::ostream & operator<< ( std::ostream & os,
const Role &  )
friend

◆ operator<< [3/3]

std::ostream & operator<< ( std::ostream & os,
const Status &  )
friend

Member Data Documentation

◆ antiparticle_

bool antiparticle_ {false}
protected

Definition at line 155 of file Particle.h.

◆ children_

ParticlesIds children_ {}
protected

Definition at line 161 of file Particle.h.

◆ helicity_

float helicity_ {0.}
protected

Definition at line 157 of file Particle.h.

◆ id_

int id_ {-1}
protected

Definition at line 154 of file Particle.h.

◆ momentum_

Momentum momentum_
protected

Definition at line 156 of file Particle.h.

◆ mothers_

ParticlesIds mothers_ {}
protected

Definition at line 160 of file Particle.h.

◆ pdg_id_

pdgid_t pdg_id_ {0}
protected

Definition at line 162 of file Particle.h.

◆ role_

Role role_ {Role::UnknownRole}
protected

Definition at line 158 of file Particle.h.

◆ status_

int status_ {static_cast<int>(Status::Undefined)}
protected

Definition at line 159 of file Particle.h.