Kinematic information for one particle. More...
#include <include/CepGen/Event/Particle.h>
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. | |
Particle & | setId (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. | |
Particle & | setAntiparticle (bool anti) |
Role | role () const |
Role in the considered process Set the particle role in the process. | |
Particle & | setRole (const Role &role) |
Status | status () const |
Particle status Set the particle decay/stability status. | |
Particle & | setStatus (Status status) |
Particle & | setStatus (int status) |
Set the particle decay/stability status. | |
Particle & | setPdgId (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) | |
Particle & | setIntegerPdgId (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. | |
Particle & | setHelicity (float heli) |
Momentum & | momentum () |
Retrieve the momentum object associated with this particle Retrieve the momentum object associated with this particle. | |
const Momentum & | momentum () const |
Particle & | setMomentum (const Momentum &, bool off_shell=false) |
Associate a momentum object with this particle. | |
Particle & | setMomentum (double px, double py, double pz, double energy=-1.) |
Set the 3- or 4-momentum associated with the particle. | |
Particle & | setMomentum (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? | |
Particle & | addMother (Particle &mother_particle) |
Set the mother particle. | |
ParticlesIds | mothers () const |
Identifier to the mother particles. | |
ParticlesIds & | mothers () |
Identifier to the mother particles. | |
Particle & | addChild (Particle &child_particle) |
Add a decay product. | |
ParticlesIds | children () const |
Identifiers list of all child particles. | |
ParticlesIds & | children () |
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. | |
Definition at line 32 of file Particle.h.
|
strong |
Definition at line 49 of file Particle.h.
|
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.
|
explicit |
[in] | role | Role of the particle in the process |
[in] | id | PDG identifier |
[in] | status | Current status |
float charge | ( | ) | const |
ParticlesIds & children | ( | ) |
Definition at line 147 of file Particle.h.
ParticlesIds children | ( | ) | const |
Definition at line 146 of file Particle.h.
float helicity | ( | ) | const |
Definition at line 115 of file Particle.h.
int id | ( | ) | const |
Definition at line 75 of file Particle.h.
long integerPdgId | ( | ) | const |
Momentum & momentum | ( | ) |
Definition at line 122 of file Particle.h.
const Momentum & momentum | ( | ) | const |
Definition at line 124 of file Particle.h.
ParticlesIds & mothers | ( | ) |
Definition at line 144 of file Particle.h.
ParticlesIds mothers | ( | ) | const |
Definition at line 143 of file Particle.h.
bool operator< | ( | const Particle & | ) | const |
bool operator== | ( | const Particle & | ) | const |
bool primary | ( | ) | const |
Definition at line 141 of file Particle.h.
Role role | ( | ) | const |
Definition at line 87 of file Particle.h.
Particle & setAntiparticle | ( | bool | anti | ) |
Definition at line 83 of file Particle.h.
Particle & setHelicity | ( | float | heli | ) |
Definition at line 117 of file Particle.h.
Particle & setId | ( | int | id | ) |
Definition at line 77 of file Particle.h.
Particle & setIntegerPdgId | ( | long | pdg_id | ) |
[in] | off_shell | allow the 4-momentum mass to compensate for E-p balance? |
Particle & setMomentum | ( | double | p[4] | ) |
[in] | p | 4-momentum |
Definition at line 136 of file Particle.h.
Particle & setMomentum | ( | double | px, |
double | py, | ||
double | pz, | ||
double | energy = -1. ) |
[in] | pdg | PDG identifier |
[in] | charge_factor | Electric charge (0, 1, or -1) |
Definition at line 89 of file Particle.h.
Particle & setStatus | ( | int | status | ) |
Definition at line 100 of file Particle.h.
Definition at line 95 of file Particle.h.
Status status | ( | ) | const |
Definition at line 93 of file Particle.h.
bool valid | ( | ) | const |
|
friend |
|
friend |
|
friend |
|
protected |
Definition at line 155 of file Particle.h.
|
protected |
Definition at line 161 of file Particle.h.
|
protected |
Definition at line 157 of file Particle.h.
|
protected |
Definition at line 154 of file Particle.h.
|
protected |
Definition at line 156 of file Particle.h.
|
protected |
Definition at line 160 of file Particle.h.
|
protected |
Definition at line 162 of file Particle.h.
|
protected |
Definition at line 158 of file Particle.h.
|
protected |
Definition at line 159 of file Particle.h.