VMC Examples Version 6.6
|
Implementation of the TVirtualMCStack interface. More...
#include <Ex01MCStack.h>
Public Member Functions | |
Ex01MCStack (Int_t size) | |
Ex01MCStack () | |
virtual | ~Ex01MCStack () |
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 &itrack) |
virtual TParticle * | PopPrimaryForTracking (Int_t i) |
virtual void | SetCurrentTrack (Int_t itrack) |
virtual Int_t | GetNtrack () const |
virtual Int_t | GetNprimary () const |
virtual TParticle * | GetCurrentTrack () const |
virtual Int_t | GetCurrentTrackNumber () const |
virtual Int_t | GetCurrentParentTrackNumber () const |
Private Member Functions | |
Ex01Particle * | GetParticle (Int_t id) const |
Private Attributes | |
std::stack< Ex01Particle * > | 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. | |
Implementation of the TVirtualMCStack interface.
Definition at line 32 of file Ex01MCStack.h.
Ex01MCStack::Ex01MCStack | ( | Int_t | size | ) |
Standard constructor
size | The stack size |
Definition at line 29 of file Ex01MCStack.cxx.
Ex01MCStack::Ex01MCStack | ( | ) |
Default constructor
Definition at line 39 of file Ex01MCStack.cxx.
|
virtual |
Destructor
Definition at line 45 of file Ex01MCStack.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 70 of file Ex01MCStack.cxx.
|
virtual |
Get next particle for tracking from the stack.
itrack | The index of the popped track |
Definition at line 123 of file Ex01MCStack.cxx.
|
virtual |
Return i -th particle in fParticles.
i | The index of primary particle to be popped |
Definition at line 144 of file Ex01MCStack.cxx.
|
virtual |
Set the current track number to a given value.
itrack | The current track number |
Definition at line 157 of file Ex01MCStack.cxx.
|
virtual |
Definition at line 166 of file Ex01MCStack.cxx.
|
virtual |
Definition at line 174 of file Ex01MCStack.cxx.
|
virtual |
Definition at line 182 of file Ex01MCStack.cxx.
|
virtual |
Definition at line 195 of file Ex01MCStack.cxx.
|
virtual |
Definition at line 202 of file Ex01MCStack.cxx.
|
private |
id | The index of the particle to be returned |
Definition at line 56 of file Ex01MCStack.cxx.
|
private |
The stack of particles (transient)
Definition at line 62 of file Ex01MCStack.h.
|
private |
The array of particle (persistent)
Definition at line 63 of file Ex01MCStack.h.
|
private |
The current track number.
Definition at line 64 of file Ex01MCStack.h.
|
private |
The number of primaries.
Definition at line 65 of file Ex01MCStack.h.