Jpp 19.3.0-rc.1
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 int 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]
 
int charge
 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 37 of file JPDB.hh.

Constructor & Destructor Documentation

◆ JParticle() [1/2]

JAANET::JParticle::JParticle ( )
inline

Default constructor.

Definition at line 41 of file JPDB.hh.

42 {
43 this->name = "";
44 this->pdg = 0;
45 this->geant = 0;
46 this->mass = 0.0;
47 this->charge = 0;
48 }
int geant
GEANT code of particle.
Definition JPDB.hh:96
std::string name
name of particle
Definition JPDB.hh:94
double mass
mass of particle [GeV]
Definition JPDB.hh:97
int charge
charge of particle [|e|/3]
Definition JPDB.hh:98
int pdg
PDG code of particle.
Definition JPDB.hh:95

◆ JParticle() [2/2]

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

Constructor.

Parameters
namename of particle
pdgPDG code of particle
geantGEANT code of particle
massmass of particle
chargecharge of particle

Definition at line 60 of file JPDB.hh.

65 {
66 this->name = name;
67 this->pdg = pdg;
68 this->geant = geant;
69 this->mass = mass;
70 this->charge = charge;
71 }

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 81 of file JPDB.hh.

82 {
83 using namespace std;
84 using namespace JPP;
85
86 return out << setw(32) << left << particle.name << " "
87 << setw( 8) << right << particle.pdg << " "
88 << setw( 6) << right << particle.geant << " "
89 << FIXED(16,10) << particle.mass << " "
90 << setw( 5) << right << particle.charge;
91 }
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 94 of file JPDB.hh.

◆ pdg

int JAANET::JParticle::pdg

PDG code of particle.

Definition at line 95 of file JPDB.hh.

◆ geant

int JAANET::JParticle::geant

GEANT code of particle.

Definition at line 96 of file JPDB.hh.

◆ mass

double JAANET::JParticle::mass

mass of particle [GeV]

Definition at line 97 of file JPDB.hh.

◆ charge

int JAANET::JParticle::charge

charge of particle [|e|/3]

Definition at line 98 of file JPDB.hh.


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