cepgen is hosted by Hepforge, IPPP Durham
CepGen 1.2.3
A generic central exclusive processes event generator
Loading...
Searching...
No Matches

Kinematic information for one particle. More...

#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  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 st=Status::Undefined)
 Build using the role of the particle in the process and its PDG id.
 
 Particle (const Particle &)
 Copy constructor.
 
 ~Particle ()=default
 
Particleoperator= (const Particle &)=default
 Assignment operator.
 
bool operator< (const Particle &rhs) const
 Comparison operator (from unique identifier)
 
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 ch=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 offshell=false)
 Associate a momentum object to this particle.
 
ParticlesetMomentum (double px, double py, double pz, double e=-1.)
 Set the 3- or 4-momentum associated to the particle.
 
ParticlesetMomentum (double p[4])
 Set the 4-momentum associated to the particle.
 
bool valid ()
 Is this particle a valid particle which can be used for kinematic computations?
 
bool primary () const
 Is this particle a primary particle?
 
ParticleclearMothers ()
 Clear the particle parentage.
 
ParticleaddMother (Particle &part)
 Set the mother particle.
 
ParticlesIds mothers () const
 Identifier to the mother particles.
 
ParticleclearDaughters ()
 Remove the decay products linking.
 
ParticleaddDaughter (Particle &part)
 Add a decay product.
 
size_t numDaughters () const
 
ParticlesIds daughters () const
 Number of daughter 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_ {UnknownRole}
 Role in the process.
 
int status_ {(int)Status::Undefined}
 Decay/stability status.
 
ParticlesIds mothers_ {}
 List of mother particles.
 
ParticlesIds daughters_ {}
 List of daughter particles.
 
pdgid_t pdg_id_ {(pdgid_t)0}
 PDG id.
 
ParticleProperties phys_prop_
 Collection of standard, bare-level physical properties.
 

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 33 of file Particle.h.

Member Enumeration Documentation

◆ Role

enum Role
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 50 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 36 of file Particle.h.

Constructor & Destructor Documentation

◆ Particle() [1/2]

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

Definition at line 28 of file Particle.cpp.

◆ Particle() [2/2]

Particle ( const Particle part)

Definition at line 33 of file Particle.cpp.

◆ ~Particle()

~Particle ( )
default

Member Function Documentation

◆ addDaughter()

Particle & addDaughter ( Particle part)

Definition at line 83 of file Particle.cpp.

◆ addMother()

Particle & addMother ( Particle part)

Definition at line 64 of file Particle.cpp.

◆ charge()

float charge ( ) const

Definition at line 57 of file Particle.cpp.

◆ clearDaughters()

Particle & clearDaughters ( )

Definition at line 78 of file Particle.cpp.

◆ clearMothers()

Particle & clearMothers ( )

Definition at line 59 of file Particle.cpp.

◆ daughters()

ParticlesIds daughters ( ) const

Identifiers list of all daughter particles

Definition at line 150 of file Particle.h.

◆ helicity()

float helicity ( ) const

Definition at line 117 of file Particle.h.

◆ id()

int id ( ) const

Definition at line 77 of file Particle.h.

◆ integerPdgId()

long integerPdgId ( ) const

Definition at line 132 of file Particle.cpp.

◆ momentum() [1/2]

Momentum & momentum ( )

Definition at line 124 of file Particle.h.

◆ momentum() [2/2]

const Momentum & momentum ( ) const

Definition at line 126 of file Particle.h.

◆ mothers()

ParticlesIds mothers ( ) const

Definition at line 146 of file Particle.h.

◆ numDaughters()

size_t numDaughters ( ) const

Definition at line 149 of file Particle.h.

◆ operator<()

bool operator< ( const Particle rhs) const

Definition at line 47 of file Particle.cpp.

◆ operator=()

Particle & operator= ( const Particle )
default

◆ pdgId()

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

Definition at line 118 of file Particle.cpp.

◆ primary()

bool primary ( ) const

Definition at line 143 of file Particle.h.

◆ role()

Role role ( ) const

Definition at line 89 of file Particle.h.

◆ setAntiparticle()

Particle & setAntiparticle ( bool  anti)

Definition at line 85 of file Particle.h.

◆ setHelicity()

Particle & setHelicity ( float  heli)

Definition at line 119 of file Particle.h.

◆ setId()

Particle & setId ( int  id)

Definition at line 79 of file Particle.h.

◆ setIntegerPdgId()

Particle & setIntegerPdgId ( long  pdg_id)

Definition at line 122 of file Particle.cpp.

◆ setMomentum() [1/3]

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

Definition at line 104 of file Particle.cpp.

◆ setMomentum() [2/3]

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

Definition at line 138 of file Particle.h.

◆ setMomentum() [3/3]

Particle & setMomentum ( double  px,
double  py,
double  pz,
double  e = -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]eEnergy, in GeV

Definition at line 111 of file Particle.cpp.

◆ setPdgId()

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

Definition at line 120 of file Particle.cpp.

◆ setRole()

Particle & setRole ( const Role role)

Definition at line 91 of file Particle.h.

◆ setStatus() [1/2]

Particle & setStatus ( int  status)

Definition at line 102 of file Particle.h.

◆ setStatus() [2/2]

Particle & setStatus ( Status  status)

Definition at line 97 of file Particle.h.

◆ status()

Status status ( ) const

Definition at line 95 of file Particle.h.

◆ valid()

bool valid ( )

Definition at line 49 of file Particle.cpp.

Friends And Related Symbol Documentation

◆ operator<< [1/3]

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

Definition at line 134 of file Particle.cpp.

◆ operator<< [2/3]

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

Definition at line 186 of file Particle.cpp.

◆ operator<< [3/3]

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

Definition at line 160 of file Particle.cpp.

Member Data Documentation

◆ antiparticle_

bool antiparticle_ {false}
protected

Definition at line 158 of file Particle.h.

◆ daughters_

ParticlesIds daughters_ {}
protected

Definition at line 164 of file Particle.h.

◆ helicity_

float helicity_ {0.}
protected

Definition at line 160 of file Particle.h.

◆ id_

int id_ {-1}
protected

Definition at line 157 of file Particle.h.

◆ momentum_

Momentum momentum_
protected

Definition at line 159 of file Particle.h.

◆ mothers_

ParticlesIds mothers_ {}
protected

Definition at line 163 of file Particle.h.

◆ pdg_id_

pdgid_t pdg_id_ {(pdgid_t)0}
protected

Definition at line 165 of file Particle.h.

◆ phys_prop_

ParticleProperties phys_prop_
protected

Definition at line 166 of file Particle.h.

◆ role_

Role role_ {UnknownRole}
protected

Definition at line 161 of file Particle.h.

◆ status_

int status_ {(int)Status::Undefined}
protected

Definition at line 162 of file Particle.h.