]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliSimulation.h
f125fcb3151e9b1ece9caedf97e6ad497204b5ae
[u/mrichter/AliRoot.git] / STEER / AliSimulation.h
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
11 class AliRunLoader;
12
13
14 class AliSimulation: public TNamed {
15 public:
16   AliSimulation(const char* configFileName = "Config.C",
17                 const char* name = "AliSimulation", 
18                 const char* title = "generation, simulation and digitization");
19   AliSimulation(const AliSimulation& sim);
20   AliSimulation& operator = (const AliSimulation& sim);
21   virtual ~AliSimulation();
22
23   void           SetNumberOfEvents(Int_t nEvents);
24   void           SetConfigFile(const char* fileName);
25   void           SetGAliceFile(const char* fileName);
26
27   void           SetRunGeneration(Bool_t run) {fRunGeneration = run;};
28   void           SetRunSimulation(Bool_t run) {fRunSimulation = run;};
29   void           SetMakeSDigits(const char* detectors) 
30                    {fMakeSDigits = detectors;};
31   void           MergeWith(const char* fileName, Int_t nSignalPerBkgrd = 0);
32   void           SetUseBkgrdVertex(Bool_t useBkgrdVertex)
33                    {fUseBkgrdVertex = useBkgrdVertex;};
34   void           SetRegionOfInterest(Bool_t flag) {fRegionOfInterest = flag;};
35   void           SetMakeDigits(const char* detectors)
36                    {fMakeDigits = detectors;};
37   void           SetMakeDigitsFromHits(const char* detectors)
38                    {fMakeDigitsFromHits = detectors;};
39   void           SetWriteRawData(const char* detectors)
40                    {fWriteRawData = detectors;};
41
42   virtual Bool_t Run(Int_t nEvents = 0);
43
44   virtual Bool_t RunSimulation(Int_t nEvents = 0);
45   virtual Bool_t RunSDigitization(const char* detectors = "ALL");
46   virtual Bool_t RunDigitization(const char* detectors = "ALL",
47                                  const char* excludeDetectors = "");
48   virtual Bool_t RunHitsDigitization(const char* detectors = "ALL");
49   virtual Bool_t WriteRawData(const char* detectors = "ALL");
50
51 private:
52   AliRunLoader*  LoadRun() const;
53   Int_t          GetNSignalPerBkgrd(Int_t nEvents = 0) const;
54   Bool_t         IsSelected(TString detName, TString& detectors) const;
55
56   Bool_t         fRunGeneration;      // generate prim. particles or not
57   Bool_t         fRunSimulation;      // simulate detectors (hits) or not
58   TString        fMakeSDigits;        // create sdigits for these detectors
59   TString        fMakeDigits;         // create digits for these detectors
60   TString        fMakeDigitsFromHits; // create digits from hits for these detectors
61   TString        fWriteRawData;       // write raw data for these detectors
62   Bool_t         fStopOnError;        // stop or continue on errors
63
64   Int_t          fNEvents;            // number of events
65   TString        fConfigFileName;     // name of the config file
66   TString        fGAliceFileName;     // name of the galice file
67   TObjArray*     fBkgrdFileNames;     // names of background files for merging
68   Bool_t         fUseBkgrdVertex;     // use vertex from background in case of merging
69   Bool_t         fRegionOfInterest;   // digitization in region of interest
70
71   ClassDef(AliSimulation, 1)  // class for running generation, simulation and digitization
72 };
73
74 #endif