// ------------------------------------------------------------------------- // ----- FairStack header file ----- // ----- Created 10/08/04 by D. Bertini / V. Friese ----- // ------------------------------------------------------------------------- /** FairStack.h *@author D.Bertini *@author V.Friese ** ** Version 14/06/07 by V. Friese ** ** This class handles the particle stack for the transport simulation. ** For the stack FILO functunality, it uses the STL stack. To store ** the tracks during transport, a TParticle arry is used. ** At the end of the event, tracks satisfying the filter criteria ** are copied to a FairMCTrack array, which is stored in the output. ** ** The filtering criteria for the output tracks are: ** - primary tracks are stored in any case. ** - secondary tracks are stored if they have a minimal number of ** points (sum of all detectors) and a minimal energy, or are the ** ** The storage of secondaries can be switched off. ** The storage of all mothers can be switched off. ** By default, the minimal number of points is 1 and the energy cut is 0. **/ #ifndef FAIRSTACK_H #define FAIRSTACK_H #include "FairGenericStack.h" #include "FairDetectorList.h" class FairStack : public FairGenericStack { public: /** Default constructor *param size Estimated track number **/ FairStack(Int_t size = 100); /** Destructor **/ virtual ~FairStack(); /** Fill the MCTrack output array, applying filter criteria **/ virtual void FillTrackArray(); /** Update the track index in the MCTracks and MCPoints **/ virtual void UpdateTrackIndex(TRefArray* detArray); /** Register the MCTrack array to the Root Manager **/ virtual void Register(); /** Output to screen **@param iVerbose: 0=events summary, 1=track info **/ virtual void Print(Int_t iVerbose=0) const; /** Increment number of points for the current track in a given detector *@param iDet Detector unique identifier **/ void AddPoint(DetectorId iDet); /** Increment number of points for an arbitrary track in a given detector *@param iDet Detector unique identifier *@param iTrack Track number **/ void AddPoint(DetectorId iDet, Int_t iTrack); private: FairStack(const FairStack&); FairStack& operator=(const FairStack&); ClassDef(FairStack,1) }; #endif