TVirtualMCStack.h

Go to the documentation of this file.
00001 // @(#)root/vmc:$Id: TVirtualMCStack.h 20882 2007-11-19 11:31:26Z rdm $
00002 // Authors: Ivana Hrivnacova 13/04/2002
00003 
00004 /*************************************************************************
00005  * Copyright (C) 2006, Rene Brun and Fons Rademakers.                    *
00006  * Copyright (C) 2002, ALICE Experiment at CERN.                         *
00007  * All rights reserved.                                                  *
00008  *                                                                       *
00009  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00010  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00011  *************************************************************************/
00012 
00013 #ifndef ROOT_TVirtualMCStack
00014 #define ROOT_TVirtualMCStack
00015 
00016 // Class TVirtualMCStack
00017 // ---------------------
00018 // Interface to a user defined particles stack.
00019 //
00020 
00021 #include "TObject.h"
00022 #include "TMCProcess.h"
00023 
00024 class TParticle;
00025 
00026 class TVirtualMCStack : public TObject {
00027 
00028 public:
00029    // Constructor
00030    TVirtualMCStack();
00031 
00032    // Destructor
00033    virtual ~TVirtualMCStack();
00034 
00035    //
00036    // Methods for stacking
00037    //
00038 
00039    // Create a new particle and push into stack;
00040    // toBeDone   - 1 if particles should go to tracking, 0 otherwise
00041    // parent     - number of the parent track, -1 if track is primary
00042    // pdg        - PDG encoding
00043    // px, py, pz - particle momentum [GeV/c]
00044    // e          - total energy [GeV]
00045    // vx, vy, vz - position [cm]
00046    // tof        - time of flight [s]
00047    // polx, poly, polz - polarization
00048    // mech       - creator process VMC code
00049    // ntr        - track number (is filled by the stack
00050    // weight     - particle weight
00051    // is         - generation status code
00052    virtual void  PushTrack(Int_t toBeDone, Int_t parent, Int_t pdg,
00053                       Double_t px, Double_t py, Double_t pz, Double_t e,
00054                       Double_t vx, Double_t vy, Double_t vz, Double_t tof,
00055                       Double_t polx, Double_t poly, Double_t polz,
00056                       TMCProcess mech, Int_t& ntr, Double_t weight,
00057                       Int_t is) = 0;
00058 
00059    // The stack has to provide two pop mechanisms:
00060    // The first pop mechanism required.
00061    // Pop all particles with toBeDone = 1, both primaries and seconadies
00062    virtual TParticle* PopNextTrack(Int_t& itrack) = 0;
00063 
00064    // The second pop mechanism required.
00065    // Pop only primary particles with toBeDone = 1, stacking of secondaries
00066    // is done by MC
00067    virtual TParticle* PopPrimaryForTracking(Int_t i) = 0;
00068 
00069    //
00070    // Set methods
00071    //
00072 
00073    // Set the current track number
00074    virtual void       SetCurrentTrack(Int_t trackNumber) = 0;
00075 
00076    //
00077    // Get methods
00078    //
00079 
00080    // Total number of tracks
00081    virtual Int_t      GetNtrack()    const = 0;
00082 
00083    // Total number of primary tracks
00084    virtual Int_t      GetNprimary()  const = 0;
00085 
00086    // Current track particle
00087    virtual TParticle* GetCurrentTrack() const= 0;
00088 
00089    // Current track number
00090    virtual Int_t      GetCurrentTrackNumber() const = 0;
00091 
00092    // Number of the parent of the current track
00093    virtual Int_t      GetCurrentParentTrackNumber() const = 0;
00094 
00095    ClassDef(TVirtualMCStack,1) //Interface to a particles stack
00096 };
00097 
00098 #endif //ROOT_TVirtualMCStack

Generated on Tue Jul 5 14:28:28 2011 for ROOT_528-00b_version by  doxygen 1.5.1