TGenerator


class description - source file - inheritance tree

class TGenerator : public TNamed


    public:
TGenerator TGenerator() TGenerator TGenerator(const char* name, const char* title = Generator class) TGenerator TGenerator(TGenerator&) virtual void ~TGenerator() virtual void Browse(TBrowser* b) TClass* Class() virtual Int_t DistancetoPrimitive(Int_t px, Int_t py) virtual void Draw(Option_t* option) virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py) virtual TObjArray* GetListOfParticles() Int_t GetNumberOfParticles() virtual TParticle* GetParticle(Int_t i) virtual TObjArray* GetPrimaries(Option_t* option) Float_t GetPtCut() virtual TObjArray* ImportParticles(Option_t* option) virtual Int_t ImportParticles(TClonesArray* particles, Option_t* option) virtual TClass* IsA() const virtual void Paint(Option_t* option) virtual void SetPtCut(Float_t ptcut = 0) virtual void SetViewRadius(Float_t rbox = 1000) virtual void SetViewRange(Float_t xmin = -10000, Float_t ymin = -10000, Float_t zmin = -10000, Float_t xmax = 10000, Float_t ymax = 10000, Float_t zmax = 10000) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void ShowNeutrons(Bool_t show = 1) virtual void Streamer(TBuffer& b)

Data Members

protected:
Float_t fPtCut Pt cut. Do not show primaries below Bool_t fShowNeutrons display neutrons if true TObjArray* fParticles static container of the primary particles

Class Description

                                                                      
 TGenerator                                                            
                                                                      
 Is an abstact base class, that defines the interface of ROOT and the 
 various event generators. Every event generator should inherit from  
 TGenerator or its subclasses.                                         
                                                                      
 Every class inherited from TGenerator knows already the interface to  
 the /HEPEVT/ common block. So in the event creation of the various   
 generators, the /HEPEVT/ common block should be filled               
 The ImportParticles method then parses the result from the event        
 generators into a TClonesArray of TParticle objects.                   
                                                                      


TGenerator(const char *name,const char *title): TNamed(name,title)
  Event generator default constructor


~TGenerator()
  Event generator default destructor


TObjArray* ImportParticles(Option_t *option)
  Default primary creation method. It reads the /HEPEVT/ common block which
  has been filled by the GenerateEvent method. If the event generator does
  not use the HEPEVT common block, This routine has to be overloaded by
  the subclasses.
  The default action is to store only the stable particles (ISTHEP = 1)
  This can be demanded explicitly by setting the option = "Final"
  If the option = "All", all the particles are stored.


Int_t ImportParticles(TClonesArray *particles, Option_t *option)
  Default primary creation method. It reads the /HEPEVT/ common block which
  has been filled by the GenerateEvent method. If the event generator does
  not use the HEPEVT common block, This routine has to be overloaded by
  the subclasses.
  The function loops on the generated particles and store them in
  the TClonesArray pointed by the argument particles.
  The default action is to store only the stable particles (ISTHEP = 1)
  This can be demanded explicitly by setting the option = "Final"
  If the option = "All", all the particles are stored.


void Browse(TBrowser *)

Int_t DistancetoPrimitive(Int_t px, Int_t py)
*-*-*-*-*-*-*-*Compute distance from point px,py to objects in event*-*-*-*
*-*            =====================================================
*-*

void Draw(Option_t *option)
  Insert one event in the pad list


void ExecuteEvent(Int_t event, Int_t px, Int_t py)
*-*-*-*-*-*-*-*-*-*-*Execute action corresponding to one event*-*-*-*
*-*                  =========================================

TParticle* GetParticle(Int_t i)
  Returns pointer to primary number i;


void Paint(Option_t *)
  Paint one event


void SetPtCut(Float_t ptcut)
  Set Pt threshold below which primaries are not drawn


void SetViewRadius(Float_t rbox)
  Set lower and upper values of the view range


void SetViewRange(Float_t xmin, Float_t ymin, Float_t zmin, Float_t xmax, Float_t ymax, Float_t zmax)
  Set lower and upper values of the view range


void ShowNeutrons(Bool_t show)
  Set flag to display or not neutrons


void Streamer(TBuffer &b)
 Stream an object of class TGenerator.



Inline Functions


         TGenerator TGenerator(const char* name, const char* title = Generator class)
              Int_t GetNumberOfParticles()
         TObjArray* GetListOfParticles()
         TObjArray* GetPrimaries(Option_t* option)
            Float_t GetPtCut()
            TClass* Class()
            TClass* IsA() const
               void ShowMembers(TMemberInspector& insp, char* parent)
         TGenerator TGenerator(TGenerator&)


Author: Ola Nordmann 21/09/95
Last update: 2.23/12 26/01/2000 09.49.07 by Rene Brun
Copyright (c) 1995-1999, The ROOT System, All rights reserved. *


ROOT page - Class index - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.