]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliSimulation.h
Possibility to run parts of the simulation/digitization chain. Code clean-up (T.Kuhr)
[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
26   void           SetRunGeneration(Bool_t run) {fRunGeneration = run;};
27   void           SetRunSimulation(Bool_t run) {fRunSimulation = run;};
28   void           SetMakeSDigits(const char* detectors) 
29                    {fMakeSDigits = detectors;};
30   void           MergeWith(const char* fileName, Int_t nSignalPerBkgrd = 1);
31   void           SetRegionOfInterest(Bool_t flag) {fRegionOfInterest = flag;};
32   void           SetMakeDigits(const char* detectors)
33                    {fMakeDigits = detectors;};
34   void           SetMakeDigitsFromHits(const char* detectors)
35                    {fMakeDigitsFromHits = detectors;};
36
37   virtual Bool_t Run(Int_t nEvents = 0);
38
39   virtual Bool_t RunSimulation(Int_t nEvents = 0);
40   virtual Bool_t RunSDigitization(const char* detectors = "ALL");
41   virtual Bool_t RunDigitization(const char* detectors = "ALL",
42                                  const char* excludeDetectors = "");
43   virtual Bool_t RunHitsDigitization(const char* detectors = "ALL");
44
45 private:
46   AliRunLoader*  LoadRun() const;
47   Bool_t         IsSelected(TString detName, TString& detectors) const;
48
49   Bool_t         fRunGeneration;      // generate prim. particles or not
50   Bool_t         fRunSimulation;      // simulate detectors (hits) or not
51   TString        fMakeSDigits;        // create sdigits for these detectors
52   TString        fMakeDigits;         // create digits for these detectors
53   TString        fMakeDigitsFromHits; // create digits from hits for these detectors
54   Bool_t         fStopOnError;        // stop or continue on errors
55
56   Int_t          fNEvents;            // number of events
57   TString        fConfigFileName;     // name of the config file
58   TString        fGAliceFileName;     // name of the galice file
59   TObjArray*     fBkgrdFileNames;     // names of background files for merging
60   Bool_t         fRegionOfInterest;   // digitization in region of interest
61
62   ClassDef(AliSimulation, 1)  // class for running generation, simulation and digitization
63 };
64
65 #endif