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

Auxiliary class to handle particle name, codes and mass. More...

#include <JPDB.hh>

Public Member Functions

 JParticle ()
 Default constructor.
 
 JParticle (const std::string &name, const int pdg, const int geant, const double mass, const JElectricCharge &charge)
 Constructor.
 

Public Attributes

std::string name
 name of particle
 
int pdg
 PDG code of particle.
 
int geant
 GEANT code of particle.
 
double mass
 mass of particle [GeV]
 
JElectricCharge charge
 electric charge of particle [|e|/3]
 

Friends

std::ostream & operator<< (std::ostream &out, const JParticle &particle)
 Print particle.
 

Detailed Description

Auxiliary class to handle particle name, codes and mass.

Definition at line 42 of file JPDB.hh.

Constructor & Destructor Documentation

◆ JParticle() [1/2]

JAANET::JParticle::JParticle ( )
inline

Default constructor.

Definition at line 46 of file JPDB.hh.

46 :
47 name(""), pdg(0), geant(0), mass(0.0), charge(0)
48 {}
int geant
GEANT code of particle.
Definition JPDB.hh:91
JElectricCharge charge
electric charge of particle [|e|/3]
Definition JPDB.hh:93
std::string name
name of particle
Definition JPDB.hh:89
double mass
mass of particle [GeV]
Definition JPDB.hh:92
int pdg
PDG code of particle.
Definition JPDB.hh:90

◆ JParticle() [2/2]

JAANET::JParticle::JParticle ( const std::string & name,
const int pdg,
const int geant,
const double mass,
const JElectricCharge & charge )
inline

Constructor.

Parameters
namename of particle
pdgPDG code of particle
geantGEANT code of particle
massmass of particle
chargeelectric charge of particle

Definition at line 60 of file JPDB.hh.

64 :
66 {}

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream & out,
const JParticle & particle )
friend

Print particle.

Parameters
outoutput stream
particleparticle
Returns
output stream

Definition at line 76 of file JPDB.hh.

77 {
78 using namespace std;
79 using namespace JPP;
80
81 return out << setw(32) << left << particle.name << " "
82 << setw( 8) << right << particle.pdg << " "
83 << setw( 6) << right << particle.geant << " "
84 << FIXED(16,10) << particle.mass << " "
85 << setw( 5) << right << static_cast<int>(particle.charge);
86 }
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary data structure for floating point format specification.
Definition JManip.hh:448

Member Data Documentation

◆ name

std::string JAANET::JParticle::name

name of particle

Definition at line 89 of file JPDB.hh.

◆ pdg

int JAANET::JParticle::pdg

PDG code of particle.

Definition at line 90 of file JPDB.hh.

◆ geant

int JAANET::JParticle::geant

GEANT code of particle.

Definition at line 91 of file JPDB.hh.

◆ mass

double JAANET::JParticle::mass

mass of particle [GeV]

Definition at line 92 of file JPDB.hh.

◆ charge

JElectricCharge JAANET::JParticle::charge

electric charge of particle [|e|/3]

Definition at line 93 of file JPDB.hh.


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