Particle


class description - source file - inheritance tree

class Particle


    public:
Particle Particle(string name, double mass, int charge) Particle Particle(Particle&) void ~Particle() TClass* Class() int GetCharge() const double GetEnergy() const double GetGamma() const double GetMass() const Vector GetMomentum() const string GetName() const Vector GetVelocity() const virtual TClass* IsA() const void SetMomentum(Vector& v) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b)

Data Members

private:
string fName particle name (C++ string) double fMass Mass of the particle int fCharge Charge of particle Vector fMomentum Momentum vector

Class Description

 Class Particle

 Particle class. Represents a massive particle in mini-geant.

 Particle objects are initialised witnh a name, mass, and
 charge. The mass must be strictly greater then Zero. We don't want
 to mess with photons, gluons, neutrinos, etc.

 Developed as a part of the HEHI C++ programming course.


Particle(string name, double mass, int charge)
 Particle constructor. Sets name, mass, and charge. Momentum and
 Position are initially set to 0 vectors

GetEnergy(void) const
 Return the energy of th Particle.

GetGamma(void) const
 Return the gamma factor of the Particle

GetVelocity(void) const



Inline Functions


               void SetMomentum(Vector& v)
             string GetName() const
             double GetMass() const
                int GetCharge() const
             Vector GetMomentum() const
            TClass* Class()
            TClass* IsA() const
               void ShowMembers(TMemberInspector& insp, char* parent)
               void Streamer(TBuffer& b)
           Particle Particle(Particle&)
               void ~Particle()


Author: cholm $
Last update: 1999/11/25 15:58:49 $


ROOT page - Home page - Class index - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.