]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ALIFAST/AliFast.h
get tables from the aliroot directory if they are not in the current one
[u/mrichter/AliRoot.git] / ALIFAST / AliFast.h
CommitLineData
65a39007 1#ifndef AliFast_H
2#define AliFast_H
3
4//////////////////////////////////////////////////////////////////////////
5// //
6// AliFast //
7// //
8// Main class to control the AliFast program. //
9// //
10// This class : //
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 //
15// //
16//////////////////////////////////////////////////////////////////////////
17
65a39007 18#include "AliFBigBang.h"
4c155701 19#include "AliFHistBrowser.h"
20#include "AliRun.h"
65a39007 21
22class TBrowser;
23class TChain;
4c155701 24class TTree;
25
26class AliFDet;
65a39007 27class AliFMCMaker;
4c155701 28class AliFMaker;
65a39007 29class AliFTrackMaker;
65a39007 30class AliFVirtualDisplay;
31
32class AliFast : public AliRun {
33
65a39007 34public:
35 AliFast();
4c155701 36 AliFast(const AliFast &afast);
65a39007 37 AliFast(const char *name, const char *title="The ALIAS fast MonteCarlo");
38 virtual ~AliFast();
4c155701 39 AliFast& operator = (const AliFast &afast)
40 {afast.Copy(*this); return (*this);}
41
65a39007 42 virtual void Browse(TBrowser *b);
4c155701 43 virtual void Draw(Option_t *option="") const; // *MENU*
44 Int_t GetVersion() const {return fVersion;}
45 Int_t GetVersionDate() const {return fVersionDate;}
65a39007 46 virtual void Clear(Option_t *option="");
4c155701 47 AliFVirtualDisplay *FDisplay() {return fFDisplay;}
65a39007 48 virtual void FillClone();
49 virtual void Finish();
50 virtual void GetTreeEvent(Int_t event); // *MENU*
51 virtual void Init();
b21a3d1a 52 Bool_t IsFolder() const {return kTRUE;}
65a39007 53 virtual void Make(Int_t i=0);
54 virtual void Paint(Option_t *option="");
55 virtual void PrintInfo();
56 virtual void SetDefaultParameters();
57
4c155701 58 TList *Makers() const {return fMakers;}
59 AliFMaker *Maker(const char *name) const {return (AliFMaker*)fMakers->FindObject(name);}
60 AliFMCMaker *MCMaker() const {return fMCMaker;}
61 AliFTrackMaker *TrackMaker() const {return fTrackMaker;}
62 AliFDet *Detector() const {return fDet;}
63 TTree *Tree() const {return fTree;}
65a39007 64
4c155701 65 Int_t Run() const {return fRun;}
66 Int_t Event() const {return fEvent;}
67 Int_t Mode() const {return fMode;}
68 Int_t TestTrack() const {return fTestTrack;}
65a39007 69
70// Getters for flags and switches
4c155701 71 Int_t Luminosity() const {return fLuminosity;}
72 Bool_t Bfield() const {return fBfield;}
73 Bool_t Smearing() const {return fSmearing;}
74 Int_t SUSYcodeLSP() const {return fSUSYcodeLSP;}
75 Bool_t TrackFinding() const {return fTrackFinding;}
65a39007 76
77
78// Setter for Event Display
4c155701 79 void SetDisplay(AliFVirtualDisplay *display) {fFDisplay=display;}
65a39007 80// Setters for flags and switches
81 void SetLuminosity(Int_t lumi=1) {fLuminosity=lumi;}
82 void SetBfield(Bool_t field=1) {fBfield=field;}
83 void SetSmearing(Bool_t val=1) {fSmearing=val;}
84 void SetSUSYcodeLSP(Int_t val=66) {fSUSYcodeLSP=val;}
85 void SetTrackFinding(Bool_t val=0) {fTrackFinding=val;}
86
87 virtual void SetRun(Int_t run=1) {fRun=run;}
88 virtual void SetEvent(Int_t event=1) {fEvent=event;}
89 virtual void SetMode(Int_t mode=0) {fMode=mode;}
90 virtual void SetTestTrack(Int_t test=0) {fTestTrack=test;}
91
92 void FillTree();
93 void InitChain(TChain *chain);
94 void MakeTree(const char* name="T", const char*title="AliFast tree");
95
4c155701 96 void SortDown(Int_t n, Float_t *a, Int_t *index, Bool_t down=kTRUE) const;
97
98private:
99
100 void Copy(TObject &afast) const;
101
102 Int_t fVersion; //AliFast version number
103 Int_t fVersionDate; //AliFast version date
104 Int_t fMode; //Run mode
105 Int_t fTestTrack; //Test mode for TrackMaker
106 TTree *fTree; //!Pointer to the Root tree
107 TList *fMakers; //List of Makers
108// pointers to standard Makers
109 AliFMCMaker *fMCMaker; //!Pointer to MCMaker
110 AliFTrackMaker *fTrackMaker; //!Pointer to TrackMaker
111 AliFDet *fDet; //!Pointer to Detector
112// flags and switches
113 Int_t fLuminosity; //Luminosity option (low=1, high=2)
114 Bool_t fBfield; //B-field (on=1,off=0)
115 Bool_t fSmearing; //Smearing on=1, off=0
116 Int_t fSUSYcodeLSP; //Code for SUSY LSP particle
117 Int_t fTrackFinding; //Track/finding on=1,off=0
118 AliFHistBrowser fHistBrowser; //Object to Browse Maker histograms
119 AliFBigBang fBigBang; //!Object to Browse generated particles
120 AliFVirtualDisplay *fFDisplay; //!Pointer to Event display object
65a39007 121
122 ClassDef(AliFast, 1) //AliFast control class
123};
124
125R__EXTERN AliFast *gAliFast;
126
127#endif
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144