VMC Examples Version 6.6
|
Implementation of the TVirtualMCStack interface. More...
#include <Ex02MCStack.h>
Public Member Functions | |
Ex02MCStack (Int_t size) | |
Ex02MCStack () | |
virtual | ~Ex02MCStack () |
virtual void | PushTrack (Int_t toBeDone, Int_t parent, Int_t pdg, Double_t px, Double_t py, Double_t pz, Double_t e, Double_t vx, Double_t vy, Double_t vz, Double_t tof, Double_t polx, Double_t poly, Double_t polz, TMCProcess mech, Int_t &ntr, Double_t weight, Int_t is) |
virtual TParticle * | PopNextTrack (Int_t &track) |
virtual TParticle * | PopPrimaryForTracking (Int_t i) |
virtual void | Print (Option_t *option="") const |
void | Reset () |
virtual void | SetCurrentTrack (Int_t track) |
void | SetObjectNumber () |
virtual Int_t | GetNtrack () const |
virtual Int_t | GetNprimary () const |
virtual TParticle * | GetCurrentTrack () const |
virtual Int_t | GetCurrentTrackNumber () const |
virtual Int_t | GetCurrentParentTrackNumber () const |
Ex02Particle * | GetParticle (Int_t id) const |
Private Attributes | |
std::stack< Ex02Particle * > | fStack |
The stack of particles (transient) | |
TObjArray * | fParticles |
The array of particle (persistent) | |
Int_t | fCurrentTrack |
The current track number. | |
Int_t | fNPrimary |
The number of primaries. | |
Int_t | fObjectNumber |
The Root object number counter. | |
Implementation of the TVirtualMCStack interface.
Definition at line 32 of file Ex02MCStack.h.
Ex02MCStack::Ex02MCStack | ( | Int_t | size | ) |
Standard constructor
size | The stack size |
Definition at line 33 of file Ex02MCStack.cxx.
Ex02MCStack::Ex02MCStack | ( | ) |
Default constructor
Definition at line 43 of file Ex02MCStack.cxx.
|
virtual |
Destructor
Definition at line 50 of file Ex02MCStack.cxx.
|
virtual |
Create a new particle and push into stack; adds it to the particles array (fParticles) and if not done to the stack (fStack).
toBeDone | 1 if particles should go to tracking, 0 otherwise |
parent | number of the parent track, -1 if track is primary |
pdg | PDG encoding |
px | particle momentum - x component [GeV/c] |
py | particle momentum - y component [GeV/c] |
pz | particle momentum - z component [GeV/c] |
e | total energy [GeV] |
vx | position - x component [cm] |
vy | position - y component [cm] |
vz | position - z component [cm] |
tof | time of flight [s] |
polx | polarization - x component |
poly | polarization - y component |
polz | polarization - z component |
mech | creator process VMC code |
ntr | track number (is filled by the stack |
weight | particle weight |
is | generation status code |
Definition at line 63 of file Ex02MCStack.cxx.
|
virtual |
Get next particle for tracking from the stack.
track | The index of the popped track |
Definition at line 116 of file Ex02MCStack.cxx.
|
virtual |
Return i -th particle in fParticles.
i | The index of primary particle to be popped |
Definition at line 137 of file Ex02MCStack.cxx.
|
virtual |
Print info for all particles.
Definition at line 150 of file Ex02MCStack.cxx.
void Ex02MCStack::Reset | ( | ) |
Delete contained particles, reset particles array and stack.
Definition at line 165 of file Ex02MCStack.cxx.
|
virtual |
Set the current track number to a given value.
track | The current track number |
Definition at line 183 of file Ex02MCStack.cxx.
void Ex02MCStack::SetObjectNumber | ( | ) |
Set the current value of Root object counter into fObjectNumber. Tis value will be restored in Reset.
Definition at line 192 of file Ex02MCStack.cxx.
|
virtual |
Definition at line 201 of file Ex02MCStack.cxx.
|
virtual |
Definition at line 209 of file Ex02MCStack.cxx.
|
virtual |
Definition at line 217 of file Ex02MCStack.cxx.
|
virtual |
Definition at line 230 of file Ex02MCStack.cxx.
|
virtual |
Definition at line 238 of file Ex02MCStack.cxx.
Ex02Particle * Ex02MCStack::GetParticle | ( | Int_t | id | ) | const |
id | The index of the particle to be returned |
Definition at line 254 of file Ex02MCStack.cxx.
|
private |
The stack of particles (transient)
Definition at line 63 of file Ex02MCStack.h.
|
private |
The array of particle (persistent)
Definition at line 64 of file Ex02MCStack.h.
|
private |
The current track number.
Definition at line 65 of file Ex02MCStack.h.
|
private |
The number of primaries.
Definition at line 66 of file Ex02MCStack.h.
|
private |
The Root object number counter.
Definition at line 67 of file Ex02MCStack.h.