Code for simulation, sdigitization and digitization moved from macros to compiled...
[u/mrichter/AliRoot.git] / STEER / AliSimulation.h
CommitLineData
85a5290f 1#ifndef ALISIMULATION_H
2#define ALISIMULATION_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
7
8#include <TNamed.h>
9#include <TString.h>
10
11class AliRunLoader;
12
13
14class AliSimulation: public TNamed {
15public:
16 AliSimulation(const char* name = "AliSimulation",
17 const char* title = "generation, simulation and digitization");
18 AliSimulation(const AliSimulation& sim);
19 AliSimulation& operator = (const AliSimulation& sim);
20 virtual ~AliSimulation();
21
22 void SetNumberOfEvents(Int_t nEvents);
23 void SetConfigFile(const char* fileName);
24
25 void SetRunGeneration(Bool_t run) {fRunGeneration = run;};
26 void SetRunSimulation(Bool_t run) {fRunSimulation = run;};
27 void SetMakeSDigits(const char* detectors)
28 {fMakeSDigits = detectors;};
29 void MergeWith(const char* fileName, Int_t nSignalPerBkgrd = 1);
30 void SetMakeDigits(const char* detectors)
31 {fMakeDigits = detectors;};
32 void SetMakeDigitsFromHits(const char* detectors)
33 {fMakeDigitsFromHits = detectors;};
34
35 virtual Bool_t Run(Int_t nEvents = 0);
36
37private:
38 void Init();
39
40 Bool_t IsSelected(TString detName, TString& detectors) const;
41
42 Bool_t RunSimulation();
43 Bool_t RunSDigitization(const TString& detectors);
44 Bool_t RunDigitization(const TString& detectors,
45 const TString& excludeDetectors);
46 Bool_t RunHitsDigitization(const TString& detectors);
47
48 Bool_t fRunGeneration; // generate prim. particles or not
49 Bool_t fRunSimulation; // simulate detectors (hits) or not
50 TString fMakeSDigits; // create sdigits for these detectors
51 TString fMakeDigits; // create digits for these detectors
52 TString fMakeDigitsFromHits; // create digits from hits for these detectors
53 Bool_t fStopOnError; // stop or continue on errors
54
55 Int_t fNEvents; // number of events
56 TString fConfigFileName; // name of the config file
57 TString fGAliceFileName; // name of the galice file
58 TObjArray* fBkgrdFileNames; // names of background files for merging
59
60 AliRunLoader* fRunLoader; //! current run loader object
61
62 ClassDef(AliSimulation, 1) // class for running generation, simulation and digitization
63};
64
65#endif