Jpp
Public Member Functions | Public Attributes | Friends | List of all members
JAANET::JParticle Struct Reference

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

#include <JPDB.hh>

Public Member Functions

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

Public Attributes

std::string name
 name of particle More...
 
int pdg
 PDG code of particle. More...
 
int geant
 GEANT code of particle. More...
 
double mass
 mass of particle [GeV] More...
 

Friends

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

Detailed Description

Auxiliary class to handle particle name, codes and mass.

Definition at line 33 of file JPDB.hh.

Constructor & Destructor Documentation

◆ JParticle() [1/2]

JAANET::JParticle::JParticle ( )
inline

Default constructor.

Definition at line 37 of file JPDB.hh.

38  {
39  this->name = "";
40  this->pdg = 0;
41  this->geant = 0;
42  this->mass = 0.0;
43  }

◆ JParticle() [2/2]

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

Constructor.

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

Definition at line 54 of file JPDB.hh.

58  {
59  this->name = name;
60  this->pdg = pdg;
61  this->geant = geant;
62  this->mass = mass;
63  }

Friends And Related Function Documentation

◆ operator<<

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

Print particle.

Parameters
outoutput stream
particleparticle
Returns
output stream

Definition at line 73 of file JPDB.hh.

74  {
75  using namespace std;
76  using namespace JEEP;
77 
78  return out << setw(32) << left << particle.name << " "
79  << setw( 6) << right << particle.pdg << " "
80  << setw( 6) << right << particle.geant << " "
81  << FIXED(12,10) << particle.mass;
82  }

Member Data Documentation

◆ name

std::string JAANET::JParticle::name

name of particle

Definition at line 85 of file JPDB.hh.

◆ pdg

int JAANET::JParticle::pdg

PDG code of particle.

Definition at line 86 of file JPDB.hh.

◆ geant

int JAANET::JParticle::geant

GEANT code of particle.

Definition at line 87 of file JPDB.hh.

◆ mass

double JAANET::JParticle::mass

mass of particle [GeV]

Definition at line 88 of file JPDB.hh.


The documentation for this struct was generated from the following file:
FIXED
Auxiliary data structure for floating point format specification.
Definition: JPrint.hh:481
JEEP
General puprpose classes and methods.
Definition: JArgs.hh:15
JAANET::JParticle::name
std::string name
name of particle
Definition: JPDB.hh:85
JAANET::JParticle::geant
int geant
GEANT code of particle.
Definition: JPDB.hh:87
JAANET::JParticle::pdg
int pdg
PDG code of particle.
Definition: JPDB.hh:86
std
Definition: jaanetDictionary.h:36
JAANET::JParticle::mass
double mass
mass of particle [GeV]
Definition: JPDB.hh:88