]>
Commit | Line | Data |
---|---|---|
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 | ||
af7ba10c | 8 | // |
9 | // class for running generation, simulation and digitization | |
10 | // Hits, sdigits and digits are created for all detectors by typing: | |
af7ba10c | 11 | // AliSimulation sim; |
12 | // sim.Run(); | |
13 | // | |
14 | ||
85a5290f | 15 | #include <TNamed.h> |
16 | #include <TString.h> | |
17 | ||
18 | class AliRunLoader; | |
19 | ||
20 | ||
21 | class AliSimulation: public TNamed { | |
22 | public: | |
95601147 | 23 | AliSimulation(const char* configFileName = "Config.C", |
24 | const char* name = "AliSimulation", | |
85a5290f | 25 | const char* title = "generation, simulation and digitization"); |
26 | AliSimulation(const AliSimulation& sim); | |
27 | AliSimulation& operator = (const AliSimulation& sim); | |
28 | virtual ~AliSimulation(); | |
29 | ||
30 | void SetNumberOfEvents(Int_t nEvents); | |
31 | void SetConfigFile(const char* fileName); | |
0421c3d1 | 32 | void SetGAliceFile(const char* fileName); |
18b43626 | 33 | void SetEventsPerFile(const char* detector, const char* type, |
34 | Int_t nEvents); | |
85a5290f | 35 | |
36 | void SetRunGeneration(Bool_t run) {fRunGeneration = run;}; | |
37 | void SetRunSimulation(Bool_t run) {fRunSimulation = run;}; | |
38 | void SetMakeSDigits(const char* detectors) | |
39 | {fMakeSDigits = detectors;}; | |
05526d44 | 40 | void MergeWith(const char* fileName, Int_t nSignalPerBkgrd = 0); |
04bae0a0 | 41 | void SetUseBkgrdVertex(Bool_t useBkgrdVertex) |
42 | {fUseBkgrdVertex = useBkgrdVertex;}; | |
4df28b43 | 43 | void SetRegionOfInterest(Bool_t flag) {fRegionOfInterest = flag;}; |
85a5290f | 44 | void SetMakeDigits(const char* detectors) |
45 | {fMakeDigits = detectors;}; | |
46 | void SetMakeDigitsFromHits(const char* detectors) | |
47 | {fMakeDigitsFromHits = detectors;}; | |
0421c3d1 | 48 | void SetWriteRawData(const char* detectors) |
49 | {fWriteRawData = detectors;}; | |
85a5290f | 50 | |
51 | virtual Bool_t Run(Int_t nEvents = 0); | |
52 | ||
95601147 | 53 | virtual Bool_t RunSimulation(Int_t nEvents = 0); |
54 | virtual Bool_t RunSDigitization(const char* detectors = "ALL"); | |
55 | virtual Bool_t RunDigitization(const char* detectors = "ALL", | |
56 | const char* excludeDetectors = ""); | |
57 | virtual Bool_t RunHitsDigitization(const char* detectors = "ALL"); | |
0421c3d1 | 58 | virtual Bool_t WriteRawData(const char* detectors = "ALL"); |
8e4a4643 | 59 | |
95601147 | 60 | private: |
61 | AliRunLoader* LoadRun() const; | |
05526d44 | 62 | Int_t GetNSignalPerBkgrd(Int_t nEvents = 0) const; |
85a5290f | 63 | Bool_t IsSelected(TString detName, TString& detectors) const; |
64 | ||
85a5290f | 65 | Bool_t fRunGeneration; // generate prim. particles or not |
66 | Bool_t fRunSimulation; // simulate detectors (hits) or not | |
67 | TString fMakeSDigits; // create sdigits for these detectors | |
68 | TString fMakeDigits; // create digits for these detectors | |
69 | TString fMakeDigitsFromHits; // create digits from hits for these detectors | |
0421c3d1 | 70 | TString fWriteRawData; // write raw data for these detectors |
85a5290f | 71 | Bool_t fStopOnError; // stop or continue on errors |
72 | ||
73 | Int_t fNEvents; // number of events | |
74 | TString fConfigFileName; // name of the config file | |
75 | TString fGAliceFileName; // name of the galice file | |
18b43626 | 76 | TObjArray fEventsPerFile; // number of events per file for given detectors and data types |
77 | ||
85a5290f | 78 | TObjArray* fBkgrdFileNames; // names of background files for merging |
04bae0a0 | 79 | Bool_t fUseBkgrdVertex; // use vertex from background in case of merging |
4df28b43 | 80 | Bool_t fRegionOfInterest; // digitization in region of interest |
85a5290f | 81 | |
85a5290f | 82 | ClassDef(AliSimulation, 1) // class for running generation, simulation and digitization |
83 | }; | |
84 | ||
85 | #endif |