Implementation of a new GetTrackPoint method (const) to add ITS space points into...
[u/mrichter/AliRoot.git] / STEER / AliSimulation.h
CommitLineData
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>
3c166bf6 17#include <TObjArray.h>
85a5290f 18
19class AliRunLoader;
20
21
22class AliSimulation: public TNamed {
23public:
95601147 24 AliSimulation(const char* configFileName = "Config.C",
25 const char* name = "AliSimulation",
85a5290f 26 const char* title = "generation, simulation and digitization");
27 AliSimulation(const AliSimulation& sim);
28 AliSimulation& operator = (const AliSimulation& sim);
29 virtual ~AliSimulation();
30
31 void SetNumberOfEvents(Int_t nEvents);
32 void SetConfigFile(const char* fileName);
0421c3d1 33 void SetGAliceFile(const char* fileName);
18b43626 34 void SetEventsPerFile(const char* detector, const char* type,
35 Int_t nEvents);
85a5290f 36
37 void SetRunGeneration(Bool_t run) {fRunGeneration = run;};
38 void SetRunSimulation(Bool_t run) {fRunSimulation = run;};
39 void SetMakeSDigits(const char* detectors)
40 {fMakeSDigits = detectors;};
05526d44 41 void MergeWith(const char* fileName, Int_t nSignalPerBkgrd = 0);
04bae0a0 42 void SetUseBkgrdVertex(Bool_t useBkgrdVertex)
43 {fUseBkgrdVertex = useBkgrdVertex;};
4df28b43 44 void SetRegionOfInterest(Bool_t flag) {fRegionOfInterest = flag;};
85a5290f 45 void SetMakeDigits(const char* detectors)
46 {fMakeDigits = detectors;};
47 void SetMakeDigitsFromHits(const char* detectors)
48 {fMakeDigitsFromHits = detectors;};
06c7e392 49 void SetWriteRawData(const char* detectors,
50 const char* fileName = NULL,
51 Bool_t deleteIntermediateFiles = kFALSE)
52 {fWriteRawData = detectors; fRawDataFileName = fileName;
53 fDeleteIntermediateFiles = deleteIntermediateFiles;};
85a5290f 54
55 virtual Bool_t Run(Int_t nEvents = 0);
56
95601147 57 virtual Bool_t RunSimulation(Int_t nEvents = 0);
58 virtual Bool_t RunSDigitization(const char* detectors = "ALL");
59 virtual Bool_t RunDigitization(const char* detectors = "ALL",
60 const char* excludeDetectors = "");
61 virtual Bool_t RunHitsDigitization(const char* detectors = "ALL");
06c7e392 62 virtual Bool_t WriteRawData(const char* detectors = "ALL",
63 const char* fileName = NULL,
64 Bool_t deleteIntermediateFiles = kFALSE);
65 virtual Bool_t WriteRawFiles(const char* detectors = "ALL");
66 virtual Bool_t ConvertRawFilesToDate(const char* dateFileName = "raw.date");
67 virtual Bool_t ConvertDateToRoot(const char* dateFileName = "raw.date",
68 const char* rootFileName = "raw.root");
8e4a4643 69
95601147 70private:
06c7e392 71 AliRunLoader* LoadRun(const char* mode = "UPDATE") const;
05526d44 72 Int_t GetNSignalPerBkgrd(Int_t nEvents = 0) const;
85a5290f 73 Bool_t IsSelected(TString detName, TString& detectors) const;
74
85a5290f 75 Bool_t fRunGeneration; // generate prim. particles or not
76 Bool_t fRunSimulation; // simulate detectors (hits) or not
77 TString fMakeSDigits; // create sdigits for these detectors
78 TString fMakeDigits; // create digits for these detectors
79 TString fMakeDigitsFromHits; // create digits from hits for these detectors
0421c3d1 80 TString fWriteRawData; // write raw data for these detectors
06c7e392 81 TString fRawDataFileName; // file name for the raw data file
82 Bool_t fDeleteIntermediateFiles; // delete intermediate raw data files
85a5290f 83 Bool_t fStopOnError; // stop or continue on errors
84
85 Int_t fNEvents; // number of events
86 TString fConfigFileName; // name of the config file
87 TString fGAliceFileName; // name of the galice file
18b43626 88 TObjArray fEventsPerFile; // number of events per file for given detectors and data types
89
85a5290f 90 TObjArray* fBkgrdFileNames; // names of background files for merging
04bae0a0 91 Bool_t fUseBkgrdVertex; // use vertex from background in case of merging
4df28b43 92 Bool_t fRegionOfInterest; // digitization in region of interest
85a5290f 93
06c7e392 94 ClassDef(AliSimulation, 2) // class for running generation, simulation and digitization
85a5290f 95};
96
97#endif