]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - STEER/AliSimulation.h
Cosmetic corrections, additional debug information
[u/mrichter/AliRoot.git] / STEER / AliSimulation.h
... / ...
CommitLineData
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//
9// class for running generation, simulation and digitization
10// Hits, sdigits and digits are created for all detectors by typing:
11// AliSimulation sim;
12// sim.Run();
13//
14
15#include <TNamed.h>
16#include <TString.h>
17
18class AliRunLoader;
19
20
21class AliSimulation: public TNamed {
22public:
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();
29
30 void SetNumberOfEvents(Int_t nEvents);
31 void SetConfigFile(const char* fileName);
32 void SetGAliceFile(const char* fileName);
33 void SetEventsPerFile(const char* detector, const char* type,
34 Int_t nEvents);
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;};
40 void MergeWith(const char* fileName, Int_t nSignalPerBkgrd = 0);
41 void SetUseBkgrdVertex(Bool_t useBkgrdVertex)
42 {fUseBkgrdVertex = useBkgrdVertex;};
43 void SetRegionOfInterest(Bool_t flag) {fRegionOfInterest = flag;};
44 void SetMakeDigits(const char* detectors)
45 {fMakeDigits = detectors;};
46 void SetMakeDigitsFromHits(const char* detectors)
47 {fMakeDigitsFromHits = detectors;};
48 void SetWriteRawData(const char* detectors,
49 const char* fileName = NULL,
50 Bool_t deleteIntermediateFiles = kFALSE)
51 {fWriteRawData = detectors; fRawDataFileName = fileName;
52 fDeleteIntermediateFiles = deleteIntermediateFiles;};
53
54 virtual Bool_t Run(Int_t nEvents = 0);
55
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");
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");
68
69private:
70 AliRunLoader* LoadRun(const char* mode = "UPDATE") const;
71 Int_t GetNSignalPerBkgrd(Int_t nEvents = 0) const;
72 Bool_t IsSelected(TString detName, TString& detectors) const;
73
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
79 TString fWriteRawData; // write raw data for these detectors
80 TString fRawDataFileName; // file name for the raw data file
81 Bool_t fDeleteIntermediateFiles; // delete intermediate raw data files
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
87 TObjArray fEventsPerFile; // number of events per file for given detectors and data types
88
89 TObjArray* fBkgrdFileNames; // names of background files for merging
90 Bool_t fUseBkgrdVertex; // use vertex from background in case of merging
91 Bool_t fRegionOfInterest; // digitization in region of interest
92
93 ClassDef(AliSimulation, 2) // class for running generation, simulation and digitization
94};
95
96#endif