]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ALIFAST/AliFast.h
Getting properly the run number and adding a protection in case of run number inconsi...
[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);
201c7e13 43 virtual void Draw(Option_t *option=""); // *MENU*
4c155701 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*
201c7e13 51 virtual void Init(const char * setup)
52 {AliRun::Init(setup);}
65a39007 53 virtual void Init();
b21a3d1a 54 Bool_t IsFolder() const {return kTRUE;}
65a39007 55 virtual void Make(Int_t i=0);
56 virtual void Paint(Option_t *option="");
57 virtual void PrintInfo();
58 virtual void SetDefaultParameters();
59
4c155701 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;}
65a39007 66
201c7e13 67 void Run(Int_t nevent, const char * setup)
68 {AliRun::Run(nevent,setup);}
4c155701 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;}
65a39007 73
74// Getters for flags and switches
4c155701 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;}
65a39007 80
81
82// Setter for Event Display
201c7e13 83 void SetDisplay(AliDisplay *display)
84 {fFDisplay=(AliFVirtualDisplay*)display;}
65a39007 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;}
91
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;}
96
97 void FillTree();
98 void InitChain(TChain *chain);
99 void MakeTree(const char* name="T", const char*title="AliFast tree");
100
4c155701 101 void SortDown(Int_t n, Float_t *a, Int_t *index, Bool_t down=kTRUE) const;
102
103private:
104
105 void Copy(TObject &afast) const;
106
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
65a39007 126
127 ClassDef(AliFast, 1) //AliFast control class
128};
129
130R__EXTERN AliFast *gAliFast;
131
132#endif
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149