32#include "FairGenericStack.h"
35#include <TMCProcess.h>
105 Int_t secondParentId);
206 for (
Int_t ipart = partFrom; ipart < partTo; ipart++) {
229 std::stack<TParticle*>
fStack;
friend F32vec4 min(const F32vec4 &a, const F32vec4 &b)
#define ClassDef(name, id)
DetectorId
BM@N DetectorID enumerator.
Int_t fCurrentTrack
Some indizes and counters.
Int_t fNParticles
Number of primary particles.
void SetStartZCut(Double_t zMax)
virtual ~CbmStack()
Destructor.
void StoreSecondaries(Bool_t choice=kTRUE)
Modifiers.
CbmStack(const CbmStack &)
virtual void FillTrackArray()
Fill the MCTrack output array, applying filter criteria.
Int_t fIndex
Number of entries in fTracks.
Int_t fNPrimaries
Index of current track.
void AddPoint(DetectorId iDet)
Increment number of points for the current track in a given detector.
virtual Int_t GetNtrack() const
Get total number of tracks Declared in TVirtualMCStack.
virtual void UpdateTrackIndex(TRefArray *detArray=0)
Update the track index in the MCTracks and MCPoints.
Bool_t fStoreSecondaries
Used for merging.
void AddPoint(DetectorId iDet, Int_t iTrack)
Increment number of points for an arbitrary track in a given detector.
virtual TParticle * PopNextTrack(Int_t &iTrack)
Get next particle for tracking from the stack.
void StoreMothers(Bool_t choice=kTRUE)
virtual void Register()
Register the MCTrack array to the Root Manager.
void SetMinPoints(Int_t min)
virtual TParticle * GetCurrentTrack() const
Get the current track's particle Declared in TVirtualMCStack.
virtual void AddParticle(TParticle *part)
Add a TParticle to the fParticles array.
std::map< Int_t, Bool_t >::iterator fStoreIter
void SetEnergyCut(Double_t eMin)
TParticle * GetParticle(Int_t trackId) const
Accessors.
virtual void AddParticle(TParticle *part)
Add a TParticle to the fParticles array.
virtual Int_t GetNprimary() const
Get number of primary tracks Declared in TVirtualMCStack.
TClonesArray * fParticles
Array of TParticles (contains all TParticles put into or created by the transport.
virtual void PushTrack(Int_t toBeDone, Int_t parentID, Int_t pdgCode, Double_t px, Double_t py, Double_t pz, Double_t e, Double_t vx, Double_t vy, Double_t vz, Double_t time, Double_t polx, Double_t poly, Double_t polz, TMCProcess proc, Int_t &ntr, Double_t weight, Int_t is)
Add a TParticle to the stack.
Int_t fNTracks
Number of entries in fParticles.
CbmStack(Int_t size=100)
Default constructor param size Estimated track number.
std::map< Int_t, Int_t >::iterator fIndexIter
virtual Int_t GetCurrentParentTrackNumber() const
Get the track number of the parent of the current track Declared in TVirtualMCStack.
TClonesArray * GetListOfParticles()
virtual Int_t GetCurrentTrackNumber() const
Get the number of the current track Declared in TVirtualMCStack.
CbmStack & operator=(const CbmStack &)
virtual void Reset()
Resets arrays and stack and deletes particles and tracks.
std::map< Int_t, Bool_t > fStoreMap
STL map from particle index to storage flag.
TClonesArray * fTracks
Array of CbmMCTracks containg the tracks written to the output.
virtual void SetCurrentTrack(Int_t iTrack)
Set the current track number Declared in TVirtualMCStack.
std::stack< TParticle * > fStack
STL stack (FILO) used to handle the TParticles for tracking.
virtual void PushTrack(Int_t toBeDone, Int_t parentID, Int_t pdgCode, Double_t px, Double_t py, Double_t pz, Double_t e, Double_t vx, Double_t vy, Double_t vz, Double_t time, Double_t polx, Double_t poly, Double_t polz, TMCProcess proc, Int_t &ntr, Double_t weight, Int_t is, Int_t secondParentId)
std::map< Int_t, Int_t > fIndexMap
STL map from particle index to track index.
virtual void Print(Option_t *) const
Output to screen: the event summary, and the track info if the log level is debug1.
void SelectTracks()
Mark tracks for output using selection criteria.
virtual FairGenericStack * CloneStack() const
Clone this object (used in MT mode only).
virtual TParticle * PopPrimaryForTracking(Int_t iPrim)
Get primary particle by index for tracking from stack Declared in TVirtualMCStack.
std::map< std::pair< Int_t, Int_t >, Int_t > fPointsMap
STL map from track index and detector ID to number of MCPoints.
void SetParticleArray(TClonesArray *partArray, Int_t partFrom, Int_t partTo)
void SetParticleArray(TClonesArray *partArray)
Int_t GetEntries() const override
TObject * At(Int_t idx) const override
Defines unique identifiers (enum) for all BM@N detector systems.