//+SEQ,CopyRight,T=NOINCLUDE. ////////////////////////////////////////////////////////////////////////// // // // 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 GetPrimaries method then parses the result from the event // // generators into a TClonesArray of TPrimary objects. // // // ////////////////////////////////////////////////////////////////////////// #ifndef ROOT_TGenerator #define ROOT_TGenerator #ifndef ROOT_TNamed //*KEEP,TNamed. #include "TNamed.h" //*KEND. #endif #ifndef ROOT_TObjArray //*KEEP,TObjArray. #include "TObjArray.h" //*KEND. #endif class TBrowser; class TPrimary; class TGenerator : public TNamed { protected: Float_t fPtCut; //Pt cut. Do not show primaries below Bool_t fShowNeutrons; //display neutrons if true TObjArray *fPrimaries; //static container of the primaries public: TGenerator(){}; //Used by Dictionary TGenerator(Text_t *name, Text_t *title="Generator class"); virtual ~TGenerator(); virtual void Browse(TBrowser *b); 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 *GetPrimaries(Option_t *option=""); virtual TPrimary *GetPrimary(Int_t i); Int_t GetNumberOfPrimaries() {return fPrimaries->GetLast()+1;} virtual TObjArray *GetListOfPrimaries() {return fPrimaries;} Float_t GetPtCut() {return fPtCut;} virtual void Paint(Option_t *option=""); virtual void SetPtCut(Float_t ptcut=0); // *MENU* virtual void SetViewRadius(Float_t rbox = 1000); //*MENU* 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); // *MENU* virtual void ShowNeutrons(Bool_t show=1); // *MENU* ClassDef(TGenerator,1) //Event generator interface abstract baseclass }; #endif