4 //////////////////////////////////////////////////////////////////////////
8 // Main class to control the AliFast program. //
11 // - Initialises the run default parameters //
12 // - Provides API to Set/Get run parameters //
13 // - Creates the support lists (TClonesArrays) for the Event structure//
14 // - Creates the physics objects makers //
16 //////////////////////////////////////////////////////////////////////////
18 #include "AliFBigBang.h"
19 #include "AliFHistBrowser.h"
30 class AliFVirtualDisplay;
32 class AliFast : public AliRun {
36 AliFast(const AliFast &afast);
37 AliFast(const char *name, const char *title="The ALIAS fast MonteCarlo");
39 AliFast& operator = (const AliFast &afast)
40 {afast.Copy(*this); return (*this);}
42 virtual void Browse(TBrowser *b);
43 virtual void Draw(Option_t *option=""); // *MENU*
44 Int_t GetVersion() const {return fVersion;}
45 Int_t GetVersionDate() const {return fVersionDate;}
46 virtual void Clear(Option_t *option="");
47 AliFVirtualDisplay *FDisplay() {return fFDisplay;}
48 virtual void FillClone();
49 virtual void Finish();
50 virtual void GetTreeEvent(Int_t event); // *MENU*
51 virtual void Init(const char * setup)
52 {AliRun::Init(setup);}
54 Bool_t IsFolder() const {return kTRUE;}
55 virtual void Make(Int_t i=0);
56 virtual void Paint(Option_t *option="");
57 virtual void PrintInfo();
58 virtual void SetDefaultParameters();
60 TList *Makers() const {return fMakers;}
61 AliFMaker *Maker(const char *name) const {return (AliFMaker*)fMakers->FindObject(name);}
62 AliFMCMaker *MCMaker() const {return fMCMaker;}
63 AliFTrackMaker *TrackMaker() const {return fTrackMaker;}
64 AliFDet *Detector() const {return fDet;}
65 TTree *Tree() const {return fTree;}
67 void Run(Int_t nevent, const char * setup)
68 {AliRun::Run(nevent,setup);}
69 Int_t Run() const {return fRun;}
70 Int_t Event() const {return fEvent;}
71 Int_t Mode() const {return fMode;}
72 Int_t TestTrack() const {return fTestTrack;}
74 // Getters for flags and switches
75 Int_t Luminosity() const {return fLuminosity;}
76 Bool_t Bfield() const {return fBfield;}
77 Bool_t Smearing() const {return fSmearing;}
78 Int_t SUSYcodeLSP() const {return fSUSYcodeLSP;}
79 Bool_t TrackFinding() const {return fTrackFinding;}
82 // Setter for Event Display
83 void SetDisplay(AliDisplay *display)
84 {fFDisplay=(AliFVirtualDisplay*)display;}
85 // Setters for flags and switches
86 void SetLuminosity(Int_t lumi=1) {fLuminosity=lumi;}
87 void SetBfield(Bool_t field=1) {fBfield=field;}
88 void SetSmearing(Bool_t val=1) {fSmearing=val;}
89 void SetSUSYcodeLSP(Int_t val=66) {fSUSYcodeLSP=val;}
90 void SetTrackFinding(Bool_t val=0) {fTrackFinding=val;}
92 virtual void SetRun(Int_t run=1) {fRun=run;}
93 virtual void SetEvent(Int_t event=1) {fEvent=event;}
94 virtual void SetMode(Int_t mode=0) {fMode=mode;}
95 virtual void SetTestTrack(Int_t test=0) {fTestTrack=test;}
98 void InitChain(TChain *chain);
99 void MakeTree(const char* name="T", const char*title="AliFast tree");
101 void SortDown(Int_t n, Float_t *a, Int_t *index, Bool_t down=kTRUE) const;
105 void Copy(TObject &afast) const;
107 Int_t fVersion; //AliFast version number
108 Int_t fVersionDate; //AliFast version date
109 Int_t fMode; //Run mode
110 Int_t fTestTrack; //Test mode for TrackMaker
111 TTree *fTree; //!Pointer to the Root tree
112 TList *fMakers; //List of Makers
113 // pointers to standard Makers
114 AliFMCMaker *fMCMaker; //!Pointer to MCMaker
115 AliFTrackMaker *fTrackMaker; //!Pointer to TrackMaker
116 AliFDet *fDet; //!Pointer to Detector
117 // flags and switches
118 Int_t fLuminosity; //Luminosity option (low=1, high=2)
119 Bool_t fBfield; //B-field (on=1,off=0)
120 Bool_t fSmearing; //Smearing on=1, off=0
121 Int_t fSUSYcodeLSP; //Code for SUSY LSP particle
122 Int_t fTrackFinding; //Track/finding on=1,off=0
123 AliFHistBrowser fHistBrowser; //Object to Browse Maker histograms
124 AliFBigBang fBigBang; //!Object to Browse generated particles
125 AliFVirtualDisplay *fFDisplay; //!Pointer to Event display object
127 ClassDef(AliFast, 1) //AliFast control class
130 R__EXTERN AliFast *gAliFast;