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

MCParticle Class Reference

This class contains methods that use an Interactor and a Medium to propagate. More...

#include <MCParticle.h>

Inheritance diagram for MCParticle:

GParticle HepLorentzVector Generator List of all members.

Public Types

enum  Status {
  ALIVE, DECAYED, INTERACTED, LEFT,
  STOPPED, LOOPING, LOST, STUCK,
  PRIMARY, SHOWER
}
 Propagation status. More...


Public Methods

 MCParticle (long id, float mass=-1)
 constructor by particle id. More...

 MCParticle (const char*, float mass=-1)
 constructor by particle name. More...

 MCParticle (const PData*, float mass=-1)
 constructor by particle data. More...

 MCParticle (const MCParticle&)
 copy constructor. More...

 ~MCParticle ()
 destructor. More...

MCParticle::Status status () const
 return status. More...

void setStatus (MCParticle::Status)
 set status. More...

float energyLoss () const
 return energy lost in current step. More...

virtual void propagate (const Medium *)
 propagate the particle and all of its progeny. More...

const MCParticle* parent () const
 override superclass, assuming that parent is also a MCParticle. More...

MCParticle* child (int i) const
 override superclass to return casted child. More...

virtual GParticleaddChild (const PData*, float mass=-1)
 add a child with the given type; return the created particle to set position, momentum etc. More...

int interact (const Medium*)
 interacts in the given medium. More...

float interactionLength (const Medium*)
 return interaction length in given medium. More...

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

int generationCount ()
float stepLength ()
float arclength ()
float currentTime ()
Point position (float s) const
Point position () const
Vector direction (float s) const
Vector direction () const
const Ray* segment () const
 access to the line segment for the current step. More...

const Mediummedium () const
 Pointer to last Medium in which particle was propagated. More...

Interactorinteractor () const
 used internally during propagation. More...

const Track* track () const
 access to the Track object. More...


Static Public Methods

void addInteractor (Interactor *)
 add (or replace) an interactor object to the PDT's list. More...

int stepCount ()
 return properties associated with the propagation. More...

const MediumgetCurrentMedium ()
 access to the current medium used in propagation. More...


Static Public Attributes

int saveTrack = 0
 usersettable: must be on to create Tracks in a shower. More...


Protected Methods

float checkStep ()
void stepBy (float, Ray&)
void endStep ()

Protected Attributes

Track* _track
Status _status
const MediumlastMedium

Static Protected Attributes

Ray* s_segment
double startingEnergy
float arcLength
float properTime
float timeOfDecay
float step
int stepcount
int generation
float turnAngle
float elossFraction
float ecut
const MediumcurrentMedium
const float MAX_TIME = 1000
const float MAX_BEND = 31
const int MAX_GENERATION = 500
const int MAX_STEPS = 10000

Detailed Description

This class contains methods that use an Interactor and a Medium to propagate.

There is also an instance of a Track for display.

Definition at line 20 of file MCParticle.h.


Member Enumeration Documentation

enum MCParticle::Status
 

Propagation status.

Enumeration values:
ALIVE  
DECAYED  
INTERACTED  
LEFT  
STOPPED  
LOOPING  
LOST  
STUCK  
PRIMARY  
SHOWER  

Definition at line 37 of file MCParticle.h.


Constructor & Destructor Documentation

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

constructor by particle id.

Definition at line 39 of file MCParticle.cxx.

Referenced by addChild().

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

constructor by particle name.

Definition at line 44 of file MCParticle.cxx.

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

constructor by particle data.

Definition at line 34 of file MCParticle.cxx.

MCParticle::MCParticle ( const MCParticle & p )
 

copy constructor.

Definition at line 49 of file MCParticle.cxx.

MCParticle::~MCParticle ( )
 

destructor.

Definition at line 55 of file MCParticle.cxx.


Member Function Documentation

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

add a child with the given type; return the created particle to set position, momentum etc.

Reimplemented from GParticle.

Definition at line 61 of file MCParticle.cxx.

Referenced by Generator::propagate().

void MCParticle::addInteractor ( Interactor * i ) [static]
 

add (or replace) an interactor object to the PDT's list.

Definition at line 388 of file MCParticle.cxx.

Referenced by Gismo::addInteractor(), and BaseApp::addInteractor().

float MCParticle::arclength ( ) [inline]
 

Definition at line 165 of file MCParticle.h.

float MCParticle::checkStep ( ) [protected]
 

Definition at line 219 of file MCParticle.cxx.

Referenced by propagate().

MCParticle * MCParticle::child ( int n ) const
 

override superclass to return casted child.

Reimplemented from GParticle.

Definition at line 69 of file MCParticle.cxx.

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

float MCParticle::currentTime ( ) [inline]
 

Definition at line 166 of file MCParticle.h.

Vector MCParticle::direction ( ) const [inline]
 

Reimplemented from GParticle.

Definition at line 169 of file MCParticle.h.

Referenced by propagate(), and DigitizerInterface::score().

Vector MCParticle::direction ( float s ) const [inline]
 

Definition at line 175 of file MCParticle.h.

void MCParticle::endStep ( ) [protected]
 

Definition at line 336 of file MCParticle.cxx.

Referenced by propagate().

float MCParticle::energyLoss ( ) const [inline]
 

return energy lost in current step.

Definition at line 158 of file MCParticle.h.

Referenced by propagate(), TowerArray::score(), ShowerDetector::score(), Calorimeter::score(), and DigitizerInterface::score().

int MCParticle::generationCount ( ) [inline]
 

Definition at line 161 of file MCParticle.h.

const Medium * MCParticle::getCurrentMedium ( ) [inline, static]
 

access to the current medium used in propagation.

Definition at line 100 of file MCParticle.h.

int MCParticle::interact ( const Medium * m ) [inline]
 

interacts in the given medium.

Definition at line 180 of file MCParticle.h.

float MCParticle::interactionLength ( const Medium * m ) [inline]
 

return interaction length in given medium.

Definition at line 182 of file MCParticle.h.

Interactor * MCParticle::interactor ( ) const [inline]
 

used internally during propagation.

Definition at line 94 of file MCParticle.h.

Referenced by endStep(), ShowerTest::init(), and stepBy().

const Medium * MCParticle::medium ( ) const [inline]
 

Pointer to last Medium in which particle was propagated.

Definition at line 186 of file MCParticle.h.

const MCParticle * MCParticle::parent ( ) const
 

override superclass, assuming that parent is also a MCParticle.

Reimplemented from GParticle.

Definition at line 74 of file MCParticle.cxx.

Referenced by propagate().

Point MCParticle::position ( ) const [inline]
 

Reimplemented from GParticle.

Definition at line 167 of file MCParticle.h.

Referenced by World::processEvent(), propagate(), Generator::propagate(), TowerArray::score(), SimpleDetector::score(), DigitizerInterface::score(), and Gismo::DisplayEvent::update().

Point MCParticle::position ( float s ) const [inline]
 

Definition at line 171 of file MCParticle.h.

Referenced by BaseApp::trigger().

void MCParticle::printOn ( std::ostream & out ) const [virtual]
 

print this one,.

Reimplemented from GParticle.

Reimplemented in Generator.

Definition at line 370 of file MCParticle.cxx.

Referenced by Generator::printOn().

void MCParticle::propagate ( const Medium * med ) [virtual]
 

propagate the particle and all of its progeny.

Reimplemented in Generator.

Definition at line 88 of file MCParticle.cxx.

Referenced by World::processEvent().

const Ray * MCParticle::segment ( ) const [inline]
 

access to the line segment for the current step.

Definition at line 88 of file MCParticle.h.

Referenced by DigitizerInterface::score().

void MCParticle::setStatus ( MCParticle::Status s ) [inline]
 

set status.

Definition at line 157 of file MCParticle.h.

Referenced by endStep(), Generator::getEvent(), propagate(), Generator::propagate(), and stepBy().

MCParticle::Status MCParticle::status ( ) const [inline]
 

return status.

Definition at line 156 of file MCParticle.h.

Referenced by endStep(), propagate(), TowerArray::score(), ShowerDetector::score(), and DigitizerInterface::score().

void MCParticle::stepBy ( float step,
Ray & path ) [protected]
 

Definition at line 295 of file MCParticle.cxx.

Referenced by propagate().

int MCParticle::stepCount ( ) [inline, static]
 

return properties associated with the propagation.

Definition at line 160 of file MCParticle.h.

float MCParticle::stepLength ( ) [inline]
 

Definition at line 164 of file MCParticle.h.

const Track * MCParticle::track ( ) const [inline]
 

access to the Track object.

Definition at line 97 of file MCParticle.h.

Referenced by ParticleRep::ParticleRep().


Member Data Documentation

const float MCParticle::MAX_BEND = 31 [static, protected]
 

Definition at line 81 of file MCParticle.cxx.

const int MCParticle::MAX_GENERATION = 500 [static, protected]
 

Definition at line 82 of file MCParticle.cxx.

const int MCParticle::MAX_STEPS = 10000 [static, protected]
 

Definition at line 83 of file MCParticle.cxx.

const float MCParticle::MAX_TIME = 1000 [static, protected]
 

Definition at line 80 of file MCParticle.cxx.

Status MCParticle::_status [protected]
 

Definition at line 107 of file MCParticle.h.

Track * MCParticle::_track [protected]
 

Definition at line 104 of file MCParticle.h.

float MCParticle::arcLength [static, protected]
 

Definition at line 399 of file MCParticle.cxx.

const Medium * MCParticle::currentMedium [static, protected]
 

Definition at line 398 of file MCParticle.cxx.

float MCParticle::ecut [static, protected]
 

Definition at line 406 of file MCParticle.cxx.

float MCParticle::elossFraction [static, protected]
 

Definition at line 138 of file MCParticle.h.

int MCParticle::generation [static, protected]
 

Definition at line 409 of file MCParticle.cxx.

const Medium * MCParticle::lastMedium [protected]
 

Definition at line 110 of file MCParticle.h.

float MCParticle::properTime [static, protected]
 

Definition at line 400 of file MCParticle.cxx.

Ray * MCParticle::s_segment [static, protected]
 

Definition at line 396 of file MCParticle.cxx.

int MCParticle::saveTrack = 0 [static]
 

usersettable: must be on to create Tracks in a shower.

Definition at line 411 of file MCParticle.cxx.

double MCParticle::startingEnergy [static, protected]
 

Definition at line 403 of file MCParticle.cxx.

float MCParticle::step [static, protected]
 

Definition at line 405 of file MCParticle.cxx.

int MCParticle::stepcount [static, protected]
 

Definition at line 408 of file MCParticle.cxx.

float MCParticle::timeOfDecay [static, protected]
 

Definition at line 402 of file MCParticle.cxx.

float MCParticle::turnAngle [static, protected]
 

Definition at line 401 of file MCParticle.cxx.


The documentation for this class was generated from the following files:
Generated at Mon Nov 26 18:18:40 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000