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 */
9 // class for running generation, simulation and digitization
10 // Hits, sdigits and digits are created for all detectors by typing:
21 class AliSimulation: public TNamed {
23 AliSimulation(const char* configFileName = "Config.C",
24 const char* name = "AliSimulation",
25 const char* title = "generation, simulation and digitization");
26 AliSimulation(const AliSimulation& sim);
27 AliSimulation& operator = (const AliSimulation& sim);
28 virtual ~AliSimulation();
30 void SetNumberOfEvents(Int_t nEvents);
31 void SetConfigFile(const char* fileName);
32 void SetGAliceFile(const char* fileName);
34 void SetRunGeneration(Bool_t run) {fRunGeneration = run;};
35 void SetRunSimulation(Bool_t run) {fRunSimulation = run;};
36 void SetMakeSDigits(const char* detectors)
37 {fMakeSDigits = detectors;};
38 void MergeWith(const char* fileName, Int_t nSignalPerBkgrd = 0);
39 void SetUseBkgrdVertex(Bool_t useBkgrdVertex)
40 {fUseBkgrdVertex = useBkgrdVertex;};
41 void SetRegionOfInterest(Bool_t flag) {fRegionOfInterest = flag;};
42 void SetMakeDigits(const char* detectors)
43 {fMakeDigits = detectors;};
44 void SetMakeDigitsFromHits(const char* detectors)
45 {fMakeDigitsFromHits = detectors;};
46 void SetWriteRawData(const char* detectors)
47 {fWriteRawData = detectors;};
49 virtual Bool_t Run(Int_t nEvents = 0);
51 virtual Bool_t RunSimulation(Int_t nEvents = 0);
52 virtual Bool_t RunSDigitization(const char* detectors = "ALL");
53 virtual Bool_t RunDigitization(const char* detectors = "ALL",
54 const char* excludeDetectors = "");
55 virtual Bool_t RunHitsDigitization(const char* detectors = "ALL");
56 virtual Bool_t WriteRawData(const char* detectors = "ALL");
59 AliRunLoader* LoadRun() const;
60 Int_t GetNSignalPerBkgrd(Int_t nEvents = 0) const;
61 Bool_t IsSelected(TString detName, TString& detectors) const;
63 Bool_t fRunGeneration; // generate prim. particles or not
64 Bool_t fRunSimulation; // simulate detectors (hits) or not
65 TString fMakeSDigits; // create sdigits for these detectors
66 TString fMakeDigits; // create digits for these detectors
67 TString fMakeDigitsFromHits; // create digits from hits for these detectors
68 TString fWriteRawData; // write raw data for these detectors
69 Bool_t fStopOnError; // stop or continue on errors
71 Int_t fNEvents; // number of events
72 TString fConfigFileName; // name of the config file
73 TString fGAliceFileName; // name of the galice file
74 TObjArray* fBkgrdFileNames; // names of background files for merging
75 Bool_t fUseBkgrdVertex; // use vertex from background in case of merging
76 Bool_t fRegionOfInterest; // digitization in region of interest
78 ClassDef(AliSimulation, 1) // class for running generation, simulation and digitization