]>
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;}; | |
06c7e392 | 48 | void SetWriteRawData(const char* detectors, |
49 | const char* fileName = NULL, | |
50 | Bool_t deleteIntermediateFiles = kFALSE) | |
51 | {fWriteRawData = detectors; fRawDataFileName = fileName; | |
52 | fDeleteIntermediateFiles = deleteIntermediateFiles;}; | |
85a5290f | 53 | |
54 | virtual Bool_t Run(Int_t nEvents = 0); | |
55 | ||
95601147 | 56 | virtual Bool_t RunSimulation(Int_t nEvents = 0); |
57 | virtual Bool_t RunSDigitization(const char* detectors = "ALL"); | |
58 | virtual Bool_t RunDigitization(const char* detectors = "ALL", | |
59 | const char* excludeDetectors = ""); | |
60 | virtual Bool_t RunHitsDigitization(const char* detectors = "ALL"); | |
06c7e392 | 61 | virtual Bool_t WriteRawData(const char* detectors = "ALL", |
62 | const char* fileName = NULL, | |
63 | Bool_t deleteIntermediateFiles = kFALSE); | |
64 | virtual Bool_t WriteRawFiles(const char* detectors = "ALL"); | |
65 | virtual Bool_t ConvertRawFilesToDate(const char* dateFileName = "raw.date"); | |
66 | virtual Bool_t ConvertDateToRoot(const char* dateFileName = "raw.date", | |
67 | const char* rootFileName = "raw.root"); | |
8e4a4643 | 68 | |
95601147 | 69 | private: |
06c7e392 | 70 | AliRunLoader* LoadRun(const char* mode = "UPDATE") const; |
05526d44 | 71 | Int_t GetNSignalPerBkgrd(Int_t nEvents = 0) const; |
85a5290f | 72 | Bool_t IsSelected(TString detName, TString& detectors) const; |
73 | ||
85a5290f | 74 | Bool_t fRunGeneration; // generate prim. particles or not |
75 | Bool_t fRunSimulation; // simulate detectors (hits) or not | |
76 | TString fMakeSDigits; // create sdigits for these detectors | |
77 | TString fMakeDigits; // create digits for these detectors | |
78 | TString fMakeDigitsFromHits; // create digits from hits for these detectors | |
0421c3d1 | 79 | TString fWriteRawData; // write raw data for these detectors |
06c7e392 | 80 | TString fRawDataFileName; // file name for the raw data file |
81 | Bool_t fDeleteIntermediateFiles; // delete intermediate raw data files | |
85a5290f | 82 | Bool_t fStopOnError; // stop or continue on errors |
83 | ||
84 | Int_t fNEvents; // number of events | |
85 | TString fConfigFileName; // name of the config file | |
86 | TString fGAliceFileName; // name of the galice file | |
18b43626 | 87 | TObjArray fEventsPerFile; // number of events per file for given detectors and data types |
88 | ||
85a5290f | 89 | TObjArray* fBkgrdFileNames; // names of background files for merging |
04bae0a0 | 90 | Bool_t fUseBkgrdVertex; // use vertex from background in case of merging |
4df28b43 | 91 | Bool_t fRegionOfInterest; // digitization in region of interest |
85a5290f | 92 | |
06c7e392 | 93 | ClassDef(AliSimulation, 2) // class for running generation, simulation and digitization |
85a5290f | 94 | }; |
95 | ||
96 | #endif |