HepMC Reference Documentation

HepMC

HepMC::ParticleData Class Reference

an example ParticleData class More...

#include <ParticleData.h>

List of all members.

Public Member Functions

 ParticleData (std::string name, int id, double charge, double mass=0, double cLifetime=-1, double spin=0)
 constructor requiring name, ID, and charge
 ParticleData (const char *name, int id, double charge, double mass=0, double cLifetime=-1, double spin=0)
 constructor requiring name, ID, and charge
virtual ~ParticleData ()
bool operator== (const ParticleData &) const
 equality
bool operator!= (const ParticleData &) const
 inequality
void print (std::ostream &ostr=std::cout) const
 write particle data information to ostr
bool is_lepton () const
 true if charged lepton /neutrino
bool is_charged_lepton () const
 true if a charged lepton
bool is_em () const
 true if an electron or photon
bool is_neutrino () const
 true if a neutrino
bool is_hadron () const
 true if a hadron
bool is_boson () const
 true if a gauge or higgs boson
std::string name () const
 description of the particle according to PDG, i.e. "Delta(1900) S_31"
int pdg_id () const
 PDG ID number.
double charge () const
 charge
double mass () const
 nominal mass
double width () const
 width as calculated from clifetime
double clifetime () const
 lifetime in mm
double spin () const
 J spin.
void set_charge (double)
 set charge
void set_mass (double)
 set nominal mass
void set_width (double)
 set width
void set_clifetime (double)
 set lifetime in mm
void set_spin (double)
 set J spin

Protected Member Functions

int model_independent_pdg_id_ () const
 omits susy/excited/technicolor digit from returned ID

Static Protected Member Functions

static unsigned int counter ()
 num ParticleData objects in memory

Friends

std::ostream & operator<< (std::ostream &, const ParticleData &)
 write to ostr


Detailed Description

an example ParticleData class

Particle Data common to all particles of a given PDG id

Examples:

example_BuildEventFromScratch.cc.

Definition at line 69 of file ParticleData.h.


Constructor & Destructor Documentation

HepMC::ParticleData::ParticleData ( std::string  name,
int  id,
double  charge,
double  mass = 0,
double  cLifetime = -1,
double  spin = 0 
)

constructor requiring name, ID, and charge

Units ID: defined by PDG group (particles are +ve, antipart are -ve) also consistent with the Pythia definitions charge: fraction of proton charge mass cLifetime: c*time Default mass=0 and cLifetime is -1 which means stable (width= 0.) These defaults exist because many very basic MC generators may produce only massless stable particles in the event record.

Definition at line 12 of file ParticleData.cc.

References set_charge(), and set_spin().

HepMC::ParticleData::ParticleData ( const char *  name,
int  id,
double  charge,
double  mass = 0,
double  cLifetime = -1,
double  spin = 0 
)

constructor requiring name, ID, and charge

note, this constructor is redundant to the one above, i.e. one could use: new HepMC::ParticleData(string("electron"),11,-1,0.000511,-1,.5); but we keep it because it is convenient.

Definition at line 30 of file ParticleData.cc.

References set_charge(), and set_spin().

HepMC::ParticleData::~ParticleData (  )  [virtual]

Definition at line 44 of file ParticleData.cc.


Member Function Documentation

double HepMC::ParticleData::charge (  )  const [inline]

charge

Definition at line 175 of file ParticleData.h.

Referenced by HepMC::operator<<(), and print().

double HepMC::ParticleData::clifetime (  )  const [inline]

lifetime in mm

Definition at line 179 of file ParticleData.h.

Referenced by HepMC::operator<<(), and print().

unsigned int HepMC::ParticleData::counter (  )  [static, protected]

num ParticleData objects in memory

Definition at line 86 of file ParticleData.cc.

bool HepMC::ParticleData::is_boson (  )  const [inline]

true if a gauge or higgs boson

true if a gauge or higgs boson --> | 9, 21-39 |

Definition at line 163 of file ParticleData.h.

References pdg_id().

bool HepMC::ParticleData::is_charged_lepton (  )  const [inline]

true if a charged lepton

true if a charged lepton --> | 11,13,15 |

Definition at line 146 of file ParticleData.h.

References is_lepton(), and pdg_id().

bool HepMC::ParticleData::is_em (  )  const [inline]

true if an electron or photon

true if an electron or photon --> | 11, 22 |

Definition at line 154 of file ParticleData.h.

References pdg_id().

bool HepMC::ParticleData::is_hadron (  )  const [inline]

true if a hadron

true if a hadron --> q,g,meson,baryon

Definition at line 158 of file ParticleData.h.

References pdg_id().

bool HepMC::ParticleData::is_lepton (  )  const [inline]

true if charged lepton /neutrino

true if a charged lepton or neutrino --> | 11,13,15,12,14,16,17,18 |

Definition at line 142 of file ParticleData.h.

References pdg_id().

Referenced by is_charged_lepton(), and is_neutrino().

bool HepMC::ParticleData::is_neutrino (  )  const [inline]

true if a neutrino

true if a neutrino --> | 12,14,16 |

Definition at line 150 of file ParticleData.h.

References is_lepton(), and pdg_id().

double HepMC::ParticleData::mass (  )  const [inline]

nominal mass

Definition at line 178 of file ParticleData.h.

Referenced by HepMC::IO_PDG_ParticleDataTable::add_quarks_to_table(), HepMC::operator<<(), and print().

int HepMC::ParticleData::model_independent_pdg_id_ (  )  const [protected]

omits susy/excited/technicolor digit from returned ID

returns the particle id with the seventh digit removed for susy/excited/technicolor particles. Thus en excited electron (40000011) would be returned as 11 Useful only internally for sorting particles!

Definition at line 61 of file ParticleData.cc.

std::string HepMC::ParticleData::name (  )  const [inline]

description of the particle according to PDG, i.e. "Delta(1900) S_31"

Definition at line 173 of file ParticleData.h.

Referenced by HepMC::operator<<(), and print().

bool HepMC::ParticleData::operator!= ( const ParticleData  )  const [inline]

inequality

Definition at line 222 of file ParticleData.h.

References pdg_id().

bool HepMC::ParticleData::operator== ( const ParticleData  )  const [inline]

equality

Definition at line 213 of file ParticleData.h.

References m_2spin, m_3charge, m_clifetime, m_mass, and m_pdg_id.

int HepMC::ParticleData::pdg_id (  )  const [inline]

PDG ID number.

Definition at line 174 of file ParticleData.h.

Referenced by HepMC::ParticleDataTable::erase(), HepMC::ParticleDataTable::insert(), is_boson(), is_charged_lepton(), is_em(), is_hadron(), is_lepton(), is_neutrino(), operator!=(), HepMC::operator<<(), and print().

void HepMC::ParticleData::print ( std::ostream &  ostr = std::cout  )  const

write particle data information to ostr

Definition at line 48 of file ParticleData.cc.

References charge(), clifetime(), mass(), name(), pdg_id(), and spin().

void HepMC::ParticleData::set_charge ( double   )  [inline]

set charge

Definition at line 181 of file ParticleData.h.

Referenced by ParticleData().

void HepMC::ParticleData::set_clifetime ( double   )  [inline]

set lifetime in mm

Definition at line 202 of file ParticleData.h.

Referenced by HepMC::IO_PDG_ParticleDataTable::read_entry().

void HepMC::ParticleData::set_mass ( double   )  [inline]

set nominal mass

Definition at line 190 of file ParticleData.h.

Referenced by HepMC::IO_PDG_ParticleDataTable::read_entry().

void HepMC::ParticleData::set_spin ( double   )  [inline]

set J spin

Definition at line 205 of file ParticleData.h.

Referenced by ParticleData().

void HepMC::ParticleData::set_width ( double   )  [inline]

set width

Definition at line 193 of file ParticleData.h.

References HepMC::HepMC_hbarc.

double HepMC::ParticleData::spin (  )  const [inline]

J spin.

Definition at line 180 of file ParticleData.h.

Referenced by HepMC::operator<<(), and print().

double HepMC::ParticleData::width (  )  const

width as calculated from clifetime

Definition at line 71 of file ParticleData.cc.

References HepMC::HepMC_hbarc.


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  ostr,
const ParticleData pdata 
) [friend]

write to ostr

Definition at line 94 of file ParticleData.cc.


The documentation for this class was generated from the following files:
Generated on Thu Jan 7 13:10:21 2010 for HepMC by  doxygen 1.4.7