Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

GParticle Class Reference

Inherit 4-momentum from HepLorentzVector. More...

#include <GParticle.h>

Inheritance diagram for GParticle:

HepLorentzVector MCParticle RCParticle Generator List of all members.

Public Methods

 GParticle (const char* name, float mass=-1)
 set mass explicitly if present, otherwise generate from PData entry defaults momentum, position, time all =0; see. More...

 GParticle (long id, float mass=-1)
 Constructor
Parameters:
id   particle id.
More...


 GParticle (const PData * data,float mass=-1)
 Constructor
Parameters:
data   particle data entry.
More...


 GParticle (const GParticle&)
 copy constructor. Does not copy children, makes original the parent. More...

virtual ~GParticle ()
 destructor. More...

double px () const
 4-momentum components in the current Lorentz frame. More...

double py () const
double pz () const
double e () const
Vector momentum () const
double pTot () const
double tx () const
 direction cosines for this particle. More...

double ty () const
double tz () const
Vector direction () const
double mass () const
 the actual mass of this particle. More...

HepBoolean hasPostionInfo () const
double x0 () const
 position of the production vertex. More...

double y0 () const
double z0 () const
Point productionVertex () const
double x () const
 current position (or position of decay vertex). More...

double y () const
double z () const
Point position () const
Point decayVertex () const
GParticle& setPosition (const Point&)
float t () const
 access to lab time of decay. More...

void setT (float)
 set the decay time. More...

float timeOfDecay () const
 life time in units of mm/c in the rest frame. More...

GParticle& setMomentum (const Vector &)
 Sets the spatial components, scaling the energy component to conserve the invariant mass. More...

GParticle& setEnergy (float)
 This scaling the spatial components to conserve the invariant mass. More...

float eta () const
 return p/m. More...

void decayOnce ()
 decay the particle, but not the daughters. More...

virtual void printOn (std::ostream&) const
 print this one,. More...

void printAll (std::ostream&) const
 Print this and all daughters (recursively). More...

const char* name () const
 return data from associated PData object. More...

float charge () const
long idCode () const
float spin () const
double lifeTime () const
const GParticle* parent () const
 get the optional parent (only set by addChild). More...

int numChildren () const
 number of children. More...

GParticle* child (int n) const
 manipulate the list of children. More...

virtual GParticle* addChild (const PData* childData, float mass=-1)
void removeChildren ()
void boost (const Vector&)
 boost the particle and its children. More...

void scatterBy (double theta, double phi)
 modify direction by given angle. More...

float GenerateTimeOfDecay ()
 set the decay time using PData info. More...


Static Public Methods

void setPDT (PDT* thePDT)
 set, retrive the PDT object used to create particle. More...

PDTthePDT ()

Protected Methods

GParticle* addChild (GParticle *)
void setE (float)
void setMass (float)
void setParent (GParticle*)

Protected Attributes

const PDatapData

Private Attributes

const GParticle* m_parent
GParticle* m_first_child
GParticle* m_next_sibling
float _mass
Point _r
float _time

Static Private Attributes

PDT_thePDT = PDT::createDefault()
const unsigned MAX_TRIES = 100

Detailed Description

Inherit 4-momentum from HepLorentzVector.

Definition at line 22 of file GParticle.h.


Constructor & Destructor Documentation

GParticle::GParticle ( const char * name,
float mass = -1 )
 

set mass explicitly if present, otherwise generate from PData entry defaults momentum, position, time all =0; see.

See also:
setMomentum, , setPosition, , setTime to modify

Definition at line 43 of file GParticle.cxx.

Referenced by addChild().

GParticle::GParticle ( long id,
float mass = -1 )
 

Constructor

Parameters:
id   particle id.

Definition at line 31 of file GParticle.cxx.

GParticle::GParticle ( const PData * data,
float mass = -1 )
 

Constructor

Parameters:
data   particle data entry.

Definition at line 21 of file GParticle.cxx.

GParticle::GParticle ( const GParticle & p )
 

copy constructor. Does not copy children, makes original the parent.

Definition at line 55 of file GParticle.cxx.

GParticle::~GParticle ( ) [virtual]
 

destructor.

Definition at line 103 of file GParticle.cxx.


Member Function Documentation

float GParticle::GenerateTimeOfDecay ( )
 

set the decay time using PData info.

Definition at line 96 of file GParticle.cxx.

Referenced by MCParticle::propagate().

GParticle * GParticle::addChild ( GParticle * child ) [protected]
 

Definition at line 198 of file GParticle.cxx.

GParticle * GParticle::addChild ( const PData * childData,
float mass = -1 ) [virtual]
 

Reimplemented in MCParticle.

Definition at line 214 of file GParticle.cxx.

Referenced by MCParticle::addChild(), MuonInteractor::interact(), GheishaInteractor::interact(), and EGSInteractor::interact().

void GParticle::boost ( const Vector & b )
 

boost the particle and its children.

Definition at line 243 of file GParticle.cxx.

float GParticle::charge ( ) const [inline]
 

Definition at line 234 of file GParticle.h.

Referenced by Interactor::afterStep(), EGSInteractor::afterStep(), EGSInteractor::ecut(), Interactor::eloss(), MCParticle::endStep(), Interactor::energyLoss(), TestApp::init(), EGSInteractor::interact(), EGSInteractor::interactionLength(), EGSInteractor::makeEGS(), Interactor::maxStepSize(), EGSInteractor::maxStepSize(), Interactor::multipleScatter(), RCParticle::propagate(), MCParticle::propagate(), SimpleDetector::score(), ShowerDetector::score(), Spectrometer::score(), and MCParticle::stepBy().

GParticle * GParticle::child ( int n ) const
 

manipulate the list of children.

Reimplemented in MCParticle.

Definition at line 234 of file GParticle.cxx.

Referenced by boost(), MCParticle::child(), EGSInteractor::interact(), and printAll().

void GParticle::decayOnce ( )
 

decay the particle, but not the daughters.

Definition at line 110 of file GParticle.cxx.

Referenced by MCParticle::endStep(), and main().

Point GParticle::decayVertex ( ) const [inline]
 

Definition at line 201 of file GParticle.h.

Vector GParticle::direction ( ) const [inline]
 

Reimplemented in MCParticle, and RCParticle.

Definition at line 224 of file GParticle.h.

Referenced by RCParticle::direction(), MCParticle::direction(), and RCParticle::position().

double GParticle::e ( ) const [inline]
 

Definition at line 183 of file GParticle.h.

Referenced by Interactor::afterStep(), Interactor::eloss(), ShowerTest::init(), TestApp::init(), MuonInteractor::interact(), EGSInteractor::interactionLength(), EGSInteractor::makeEGS(), Interactor::maxStepSize(), EGSInteractor::maxStepSize(), Interactor::multipleScatter(), MCParticle::propagate(), ShowerDetector::score(), Spectrometer::score(), RCParticle::stepBy(), and MCParticle::stepBy().

float GParticle::eta ( ) const [inline]
 

return p/m.

Definition at line 252 of file GParticle.h.

HepBoolean GParticle::hasPostionInfo ( ) const
 

Definition at line 312 of file GParticle.cxx.

long GParticle::idCode ( ) const [inline]
 

Definition at line 237 of file GParticle.h.

Referenced by MuonInteractor::interact(), GheishaInteractor::interact(), GheishaInteractor::interactionLength(), and ShowerDetector::score().

double GParticle::lifeTime ( ) const [inline]
 

Definition at line 243 of file GParticle.h.

double GParticle::mass ( ) const [inline]
 

the actual mass of this particle.

Definition at line 228 of file GParticle.h.

Referenced by Interactor::afterStep(), TwoBody::decay(), PhaseSpace::decay2(), PhaseSpace::decay3(), decayOnce(), Interactor::ecut(), Interactor::eloss(), Interactor::energyLoss(), ShowerTest::init(), TestApp::init(), MuonInteractor::interact(), EGSInteractor::interact(), Interactor::maxStepSize(), Generator::propagate(), ShowerDetector::score(), setMass(), RCParticle::stepBy(), and MCParticle::stepBy().

Vector GParticle::momentum ( ) const [inline]
 

Definition at line 187 of file GParticle.h.

Referenced by Interactor::energyLoss(), MuonInteractor::interact(), RCParticle::propagate(), MCParticle::propagate(), Generator::propagate(), Spectrometer::score(), RCParticle::stepBy(), and MCParticle::stepBy().

const char * GParticle::name ( ) const [inline]
 

return data from associated PData object.

Definition at line 231 of file GParticle.h.

Referenced by Interactor::interact(), and printOn().

int GParticle::numChildren ( ) const
 

number of children.

Definition at line 219 of file GParticle.cxx.

Referenced by ParticleRep::ParticleRep(), boost(), printAll(), MCParticle::propagate(), and ShowerDetector::score().

double GParticle::pTot ( ) const [inline]
 

Definition at line 255 of file GParticle.h.

Referenced by Interactor::eloss(), ShowerTest::init(), TestApp::init(), MuonInteractor::interact(), GheishaInteractor::interactionLength(), EGSInteractor::interactionLength(), Interactor::maxStepSize(), Interactor::multipleScatter(), SimpleDetector::score(), and Spectrometer::score().

const GParticle * GParticle::parent ( ) const
 

get the optional parent (only set by addChild).

Reimplemented in MCParticle.

Definition at line 231 of file GParticle.cxx.

Referenced by MCParticle::parent(), and printAll().

Point GParticle::position ( ) const [inline]
 

Reimplemented in MCParticle, and RCParticle.

Definition at line 204 of file GParticle.h.

Referenced by RCParticle::position(), and MCParticle::position().

void GParticle::printAll ( std::ostream & cout ) const
 

Print this and all daughters (recursively).

Definition at line 253 of file GParticle.cxx.

Referenced by operator<<(), and Generator::printOn().

void GParticle::printOn ( std::ostream & str ) const [virtual]
 

print this one,.

Reimplemented in Generator, MCParticle, and RCParticle.

Definition at line 262 of file GParticle.cxx.

Referenced by printAll(), RCParticle::printOn(), and MCParticle::printOn().

Point GParticle::productionVertex ( ) const [inline]
 

Definition at line 216 of file GParticle.h.

double GParticle::px ( ) const [inline]
 

4-momentum components in the current Lorentz frame.

Definition at line 177 of file GParticle.h.

Referenced by GheishaInteractor::interact(), EGSInteractor::makeEGS(), and scatterBy().

double GParticle::py ( ) const [inline]
 

Definition at line 179 of file GParticle.h.

Referenced by GheishaInteractor::interact(), EGSInteractor::makeEGS(), and scatterBy().

double GParticle::pz ( ) const [inline]
 

Definition at line 181 of file GParticle.h.

Referenced by GheishaInteractor::interact(), EGSInteractor::makeEGS(), and scatterBy().

void GParticle::removeChildren ( )
 

Definition at line 186 of file GParticle.cxx.

Referenced by Generator::getEvent(), MCParticle::propagate(), and ~GParticle().

void GParticle::scatterBy ( double theta,
double phi )
 

modify direction by given angle.

Definition at line 273 of file GParticle.cxx.

Referenced by Interactor::multipleScatter().

void GParticle::setE ( float e ) [inline, protected]
 

Definition at line 185 of file GParticle.h.

Referenced by setEnergy(), setMass(), and setMomentum().

GParticle & GParticle::setEnergy ( float e )
 

This scaling the spatial components to conserve the invariant mass.

If the spatial components are 0, the result is a floating exception.

Definition at line 86 of file GParticle.cxx.

Referenced by Interactor::afterStep(), MuonInteractor::interact(), and EGSInteractor::interact().

void GParticle::setMass ( float mass ) [protected]
 

Definition at line 67 of file GParticle.cxx.

Referenced by GParticle().

GParticle & GParticle::setMomentum ( const Vector & p )
 

Sets the spatial components, scaling the energy component to conserve the invariant mass.

Definition at line 77 of file GParticle.cxx.

Referenced by Generator::Generator(), RCParticle::RCParticle(), Interactor::afterStep(), EGSInteractor::afterStep(), TwoBody::decay(), PhaseSpace::decay2(), PhaseSpace::decay3(), ShowerTest::init(), TestApp::init(), MuonInteractor::interact(), GheishaInteractor::interact(), EGSInteractor::interact(), MCParticle::propagate(), Generator::propagate(), and MCParticle::stepBy().

void GParticle::setPDT ( PDT * thePDT ) [inline, static]
 

set, retrive the PDT object used to create particle.

Definition at line 246 of file GParticle.h.

void GParticle::setParent ( GParticle * p ) [protected]
 

Definition at line 108 of file GParticle.cxx.

Referenced by addChild().

GParticle & GParticle::setPosition ( const Point & r ) [inline]
 

Definition at line 207 of file GParticle.h.

Referenced by Generator::Generator(), RCParticle::RCParticle(), addChild(), Generator::propagate(), RCParticle::stepBy(), and MCParticle::stepBy().

void GParticle::setT ( float t ) [inline]
 

set the decay time.

Definition at line 199 of file GParticle.h.

Referenced by addChild(), MCParticle::endStep(), RCParticle::stepBy(), and MCParticle::stepBy().

float GParticle::spin ( ) const [inline]
 

Definition at line 240 of file GParticle.h.

float GParticle::t ( ) const [inline]
 

access to lab time of decay.

Definition at line 197 of file GParticle.h.

Referenced by MCParticle::endStep(), RCParticle::stepBy(), and MCParticle::stepBy().

PDT * GParticle::thePDT ( ) [inline, static]
 

Definition at line 249 of file GParticle.h.

Referenced by MCParticle::addInteractor(), SetBeam::execute(), Gismo::PrintPDT::execute(), GheishaInteractor::interact(), EGSInteractor::interact(), main(), BaseApp::printPDT(), ShowerDetector::score(), and Gismo::~Gismo().

float GParticle::timeOfDecay ( ) const
 

life time in units of mm/c in the rest frame.

Definition at line 313 of file GParticle.cxx.

double GParticle::tx ( ) const [inline]
 

direction cosines for this particle.

Definition at line 218 of file GParticle.h.

double GParticle::ty ( ) const [inline]
 

Definition at line 220 of file GParticle.h.

double GParticle::tz ( ) const [inline]
 

Definition at line 222 of file GParticle.h.

double GParticle::x ( ) const [inline]
 

current position (or position of decay vertex).

Definition at line 191 of file GParticle.h.

double GParticle::x0 ( ) const [inline]
 

position of the production vertex.

Definition at line 210 of file GParticle.h.

double GParticle::y ( ) const [inline]
 

Definition at line 193 of file GParticle.h.

double GParticle::y0 ( ) const [inline]
 

Definition at line 212 of file GParticle.h.

double GParticle::z ( ) const [inline]
 

Definition at line 195 of file GParticle.h.

double GParticle::z0 ( ) const [inline]
 

Definition at line 214 of file GParticle.h.


Member Data Documentation

const unsigned GParticle::MAX_TRIES = 100 [static, private]
 

Definition at line 310 of file GParticle.cxx.

float GParticle::_mass [private]
 

Definition at line 155 of file GParticle.h.

Point GParticle::_r [private]
 

Definition at line 157 of file GParticle.h.

PDT * GParticle::_thePDT = PDT::createDefault() [static, private]
 

Definition at line 309 of file GParticle.cxx.

float GParticle::_time [private]
 

Definition at line 158 of file GParticle.h.

GParticle * GParticle::m_first_child [private]
 

Definition at line 151 of file GParticle.h.

GParticle * GParticle::m_next_sibling [private]
 

Definition at line 152 of file GParticle.h.

const GParticle * GParticle::m_parent [private]
 

Definition at line 150 of file GParticle.h.

const PData * GParticle::pData [protected]
 

Definition at line 143 of file GParticle.h.


The documentation for this class was generated from the following files:
Generated at Wed Nov 21 12:20:29 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000