VMC Examples Version 6.6
|
Implementation of the TVirtualMCStack interface. More...
#include <Ex03cMCStack.h>
Public Member Functions | |
Ex03cMCStack (Int_t size) | |
Ex03cMCStack () | |
virtual | ~Ex03cMCStack () |
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) |
virtual Int_t | GetNtrack () const |
virtual Int_t | GetNprimary () const |
virtual TParticle * | GetCurrentTrack () const |
virtual Int_t | GetCurrentTrackNumber () const |
virtual Int_t | GetCurrentParentTrackNumber () const |
TParticle * | GetParticle (Int_t id) const |
Private Attributes | |
std::stack< TParticle * > | fStack |
The stack of particles (transient) | |
TClonesArray * | 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.
A variant of the Ex03CalorimeterSD class updated for multiple engine runs.
Definition at line 36 of file Ex03cMCStack.h.
Ex03cMCStack::Ex03cMCStack | ( | Int_t | size | ) |
Standard constructor
size | The stack size |
Definition at line 34 of file Ex03cMCStack.cxx.
Ex03cMCStack::Ex03cMCStack | ( | ) |
Default constructor
Definition at line 44 of file Ex03cMCStack.cxx.
|
virtual |
Destructor
Definition at line 50 of file Ex03cMCStack.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). Use TParticle::fMother[1] to store Track ID.
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 |
Forward to the TMCManager in case of multi-run
Definition at line 63 of file Ex03cMCStack.cxx.
|
virtual |
Get next particle for tracking from the stack.
track | The index of the popped track |
Definition at line 117 of file Ex03cMCStack.cxx.
|
virtual |
Return i -th particle in fParticles.
i | The index of primary particle to be popped |
Definition at line 138 of file Ex03cMCStack.cxx.
|
virtual |
Print info for all particles.
Definition at line 151 of file Ex03cMCStack.cxx.
void Ex03cMCStack::Reset | ( | ) |
Delete contained particles, reset particles array and stack.
Definition at line 163 of file Ex03cMCStack.cxx.
|
virtual |
Set the current track number to a given value.
track | The current track number |
Definition at line 173 of file Ex03cMCStack.cxx.
|
virtual |
Definition at line 182 of file Ex03cMCStack.cxx.
|
virtual |
Definition at line 190 of file Ex03cMCStack.cxx.
|
virtual |
Definition at line 198 of file Ex03cMCStack.cxx.
|
virtual |
Definition at line 211 of file Ex03cMCStack.cxx.
|
virtual |
Definition at line 219 of file Ex03cMCStack.cxx.
TParticle * Ex03cMCStack::GetParticle | ( | Int_t | id | ) | const |
id | The index of the particle to be returned |
Definition at line 232 of file Ex03cMCStack.cxx.
|
private |
The stack of particles (transient)
Definition at line 66 of file Ex03cMCStack.h.
|
private |
The array of particle (persistent)
Definition at line 67 of file Ex03cMCStack.h.
|
private |
The current track number.
Definition at line 68 of file Ex03cMCStack.h.
|
private |
The number of primaries.
Definition at line 69 of file Ex03cMCStack.h.