VMC Version 2.0
|
Concrete implementation of particles stack used by the TMCManager. More...
#include <TMCManagerStack.h>
Public Member Functions | |
TMCManagerStack () | |
Default constructor. | |
virtual | ~TMCManagerStack ()=default |
Destructor. | |
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) override final |
This will just forward the call to the fUserStack's PushTrack. | |
TParticle * | PopNextTrack (Int_t &itrack) override final |
Pop next track. | |
TParticle * | PopPrimaryForTracking (Int_t i) override final |
Pop i'th primar, that does not mean that this primariy also has ID==i. | |
TParticle * | PopPrimaryForTracking (Int_t i, Int_t &itrack) |
Pop i'th primary, that does not mean that this primariy also has ID==i. | |
Int_t | GetNtrack () const override final |
Get number of tracks on current sub-stack. | |
Int_t | GetStackedNtrack () const |
Get only the number of currently stacked tracks. | |
Int_t | GetNprimary () const override final |
Get number of primaries on current sub-stack. | |
Int_t | GetStackedNprimary () const |
Get only the number of currently stacked primaries. | |
TParticle * | GetCurrentTrack () const override final |
Current track. | |
Int_t | GetCurrentTrackNumber () const override final |
Current track number. | |
Int_t | GetCurrentParentTrackNumber () const override final |
Number of the parent of the current track. | |
void | SetCurrentTrack (Int_t trackId) override final |
Set the current track id from the outside and forward this to the user's stack. | |
const TMCParticleStatus * | GetParticleStatus (Int_t trackId) const |
Get TMCParticleStatus by trackId. | |
const TGeoBranchArray * | GetGeoState (Int_t trackId) const |
Get particle's geometry status by trackId. | |
const TGeoBranchArray * | GetCurrentGeoState () const |
Get current particle's geometry status. | |
Public Member Functions inherited from TVirtualMCStack | |
TVirtualMCStack () | |
Default constructor. | |
virtual | ~TVirtualMCStack () |
Destructor. | |
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)=0 |
Create a new particle and push into stack;. | |
virtual TParticle * | PopNextTrack (Int_t &itrack)=0 |
The stack has to provide two pop mechanisms: The first pop mechanism required. | |
virtual TParticle * | PopPrimaryForTracking (Int_t i)=0 |
The second pop mechanism required. | |
virtual void | SetCurrentTrack (Int_t trackNumber)=0 |
Set the current track number. | |
virtual Int_t | GetNtrack () const =0 |
Total number of tracks. | |
virtual Int_t | GetNprimary () const =0 |
Total number of primary tracks. | |
virtual TParticle * | GetCurrentTrack () const =0 |
Current track particle. | |
virtual Int_t | GetCurrentTrackNumber () const =0 |
Current track number. | |
virtual Int_t | GetCurrentParentTrackNumber () const =0 |
Number of the parent of the current track. | |
Private Member Functions | |
Bool_t | HasTrackId (Int_t trackId) const |
Check whether track trackId exists. | |
void | SetUserStack (TVirtualMCStack *stack) |
Set the user stack. | |
void | ConnectTrackContainers (std::vector< TParticle * > *particles, std::vector< std::unique_ptr< TMCParticleStatus > > *tracksStatus, TGeoMCBranchArrayContainer *branchArrayContainer, Int_t *totalNPrimaries, Int_t *totalNTracks) |
Set the pointer to vector with all particles and status. | |
void | PushPrimaryTrackId (Int_t trackId) |
Push primary id to be processed. | |
void | PushSecondaryTrackId (Int_t trackId) |
Push secondary id to be processed. | |
void | ResetInternals () |
Reset internals, clear engine stack and fParticles and reset buffered values. | |
Private Attributes | |
Int_t | fCurrentTrackId |
Pointer to current track. | |
TVirtualMCStack * | fUserStack |
Pointer to user stack for forwarding PushTrack calls. | |
Int_t * | fTotalNPrimaries |
Number of all primaries ever pushed linked from the TMCManager. | |
Int_t * | fTotalNTracks |
Number of all tracks ever pushed linked from the TMCManager. | |
std::vector< TParticle * > * | fParticles |
All tracks linked from the TMCManager. | |
std::vector< std::unique_ptr< TMCParticleStatus > > * | fParticlesStatus |
All TMCParticleStatus linked from the TMCManager. | |
TGeoMCBranchArrayContainer * | fBranchArrayContainer |
Storage of TGeoBranchArray pointers. | |
std::stack< Int_t > | fPrimariesStack |
IDs of primaries to be tracked. | |
std::stack< Int_t > | fSecondariesStack |
IDs of secondaries to be trackedk. | |
Friends | |
class | TMCManager |
Concrete implementation of particles stack used by the TMCManager.
Definition at line 42 of file TMCManagerStack.h.
TMCManagerStack::TMCManagerStack | ( | ) |
Default constructor.
Definition at line 38 of file TMCManagerStack.cxx.
|
virtualdefault |
Destructor.
|
finaloverridevirtual |
This will just forward the call to the fUserStack's PushTrack.
Create a new particle and push into stack;
Implements TVirtualMCStack.
Definition at line 49 of file TMCManagerStack.cxx.
|
finaloverridevirtual |
|
finaloverridevirtual |
Pop i'th primar, that does not mean that this primariy also has ID==i.
Pop i'th primary; that does not mean that this primariy has ID==i.
Implements TVirtualMCStack.
Definition at line 87 of file TMCManagerStack.cxx.
Referenced by PopPrimaryForTracking().
TParticle * TMCManagerStack::PopPrimaryForTracking | ( | Int_t | i, |
Int_t & | itrack | ||
) |
Pop i'th primary, that does not mean that this primariy also has ID==i.
Pop i'th primary; that does not mean that this primariy has ID==i.
including actual index
Definition at line 99 of file TMCManagerStack.cxx.
|
finaloverridevirtual |
Get number of tracks on current sub-stack.
Implements TVirtualMCStack.
Definition at line 118 of file TMCManagerStack.cxx.
Int_t TMCManagerStack::GetStackedNtrack | ( | ) | const |
Get only the number of currently stacked tracks.
Definition at line 128 of file TMCManagerStack.cxx.
|
finaloverridevirtual |
Get number of primaries on current sub-stack.
Implements TVirtualMCStack.
Definition at line 138 of file TMCManagerStack.cxx.
Int_t TMCManagerStack::GetStackedNprimary | ( | ) | const |
Get only the number of currently stacked primaries.
Get number of primaries on current sub-stack.
Definition at line 148 of file TMCManagerStack.cxx.
|
finaloverridevirtual |
|
finaloverridevirtual |
Current track number.
Implements TVirtualMCStack.
Definition at line 173 of file TMCManagerStack.cxx.
|
finaloverridevirtual |
Number of the parent of the current track.
Implements TVirtualMCStack.
Definition at line 183 of file TMCManagerStack.cxx.
|
finaloverridevirtual |
Set the current track id from the outside and forward this to the user's stack.
Implements TVirtualMCStack.
Definition at line 194 of file TMCManagerStack.cxx.
Referenced by PopNextTrack().
const TMCParticleStatus * TMCManagerStack::GetParticleStatus | ( | Int_t | trackId | ) | const |
Get TMCParticleStatus by trackId.
Definition at line 208 of file TMCManagerStack.cxx.
const TGeoBranchArray * TMCManagerStack::GetGeoState | ( | Int_t | trackId | ) | const |
Get particle's geometry status by trackId.
Definition at line 221 of file TMCManagerStack.cxx.
const TGeoBranchArray * TMCManagerStack::GetCurrentGeoState | ( | ) | const |
Get current particle's geometry status.
Definition at line 234 of file TMCManagerStack.cxx.
|
private |
Check whether track trackId exists.
Definition at line 244 of file TMCManagerStack.cxx.
Referenced by GetGeoState(), GetParticleStatus(), and SetCurrentTrack().
|
private |
Set the user stack.
Definition at line 257 of file TMCManagerStack.cxx.
|
private |
Set the pointer to vector with all particles and status.
Connect an engine's stack to the centrally managed vectors.
Definition at line 267 of file TMCManagerStack.cxx.
|
private |
Push primary id to be processed.
Push primary track id to be processed.
Definition at line 284 of file TMCManagerStack.cxx.
|
private |
Push secondary id to be processed.
Push secondary track id to be processed.
Definition at line 294 of file TMCManagerStack.cxx.
|
private |
Reset internals, clear engine stack and fParticles and reset buffered values.
Definition at line 304 of file TMCManagerStack.cxx.
|
friend |
Definition at line 122 of file TMCManagerStack.h.
|
private |
Pointer to current track.
Definition at line 141 of file TMCManagerStack.h.
Referenced by GetCurrentGeoState(), GetCurrentParentTrackNumber(), GetCurrentTrack(), GetCurrentTrackNumber(), ResetInternals(), and SetCurrentTrack().
|
private |
Pointer to user stack for forwarding PushTrack calls.
Definition at line 143 of file TMCManagerStack.h.
Referenced by PushTrack(), SetCurrentTrack(), and SetUserStack().
|
private |
Number of all primaries ever pushed linked from the TMCManager.
Definition at line 145 of file TMCManagerStack.h.
Referenced by ConnectTrackContainers(), and GetNprimary().
|
private |
Number of all tracks ever pushed linked from the TMCManager.
Definition at line 147 of file TMCManagerStack.h.
Referenced by ConnectTrackContainers(), and GetNtrack().
|
private |
All tracks linked from the TMCManager.
Definition at line 149 of file TMCManagerStack.h.
Referenced by ConnectTrackContainers(), GetCurrentTrack(), HasTrackId(), PopNextTrack(), and PopPrimaryForTracking().
|
private |
All TMCParticleStatus linked from the TMCManager.
Definition at line 151 of file TMCManagerStack.h.
Referenced by ConnectTrackContainers(), GetCurrentGeoState(), GetCurrentParentTrackNumber(), GetGeoState(), and GetParticleStatus().
|
private |
Storage of TGeoBranchArray pointers.
Definition at line 153 of file TMCManagerStack.h.
Referenced by ConnectTrackContainers(), GetCurrentGeoState(), and GetGeoState().
|
private |
IDs of primaries to be tracked.
Definition at line 155 of file TMCManagerStack.h.
Referenced by GetStackedNprimary(), GetStackedNtrack(), PopNextTrack(), PopPrimaryForTracking(), PushPrimaryTrackId(), and ResetInternals().
|
private |
IDs of secondaries to be trackedk.
Definition at line 157 of file TMCManagerStack.h.
Referenced by GetStackedNtrack(), PopNextTrack(), PushSecondaryTrackId(), and ResetInternals().