1 ////////////////////////////////////////////////////////////////////////
5 // last update: 21.07.2003
10 // merges sdigits from a signal and a background event
11 // to digits for several detectors
12 // (for advanced features like more input streams see
13 // AliRunDigitizer.cxx)
16 // const char* fileNameSignal : galice file of the signal event
17 // const char* fileNameBkgrd : galice file of the background event
18 // Int_t nEvents : how many events to process (<0 means all)
19 // Int_t signalPerBkgrd : number of signal events merged with
20 // the same background event
21 // Int_t ITS, TPC, ... : flags for diff. detectors
25 // 21.07.03 - first version
27 ////////////////////////////////////////////////////////////////////////
29 #if !defined(__CINT__) || defined(__MAKECINT__)
30 #include "STEER/AliRun.h"
31 #include "STEER/AliRunDigitizer.h"
32 #include "ITS/AliITSDigitizer.h"
33 #include "ITS/AliITSFDigitizer.h"
34 #include "TPC/AliTPCDigitizer.h"
35 #include "TRD/AliTRDdigitizer.h"
36 #include "PHOS/AliPHOSDigitizer.h"
37 #include "MUON/AliMUONDigitizer.h"
38 #include "RICH/AliRICHDigitizer.h"
39 #include "TStopwatch.h"
42 Bool_t AliMerge(const char* fileNameSignal = "signal/galice.root",
43 const char* fileNameBkgrd = "bkgrd/galice.root",
44 Int_t nEvents = -1, Int_t signalPerBkgrd = 1,
45 Int_t iITS = 0, Int_t iTPC = 0, Int_t iTRD = 0,
46 Int_t iPHOS = 0, Int_t iMUON = 0, Int_t iRICH = 0)
48 if (gAlice) delete gAlice;
51 AliRunDigitizer* manager = new AliRunDigitizer(2, signalPerBkgrd);
52 manager->SetInputStream(0, fileNameSignal);
53 manager->SetInputStream(1, fileNameBkgrd);
54 if (nEvents >= 0) manager->SetNrOfEventsToWrite(nEvents);
56 if (iITS == 1) new AliITSDigitizer(manager);
57 if (iITS == 2) new AliITSFDigitizer(manager);
58 if (iTPC) new AliTPCDigitizer(manager);
59 if (iTRD) new AliTRDdigitizer(manager);
60 if (iPHOS) new AliPHOSDigitizer(manager);
61 if (iMUON) new AliMUONDigitizer(manager);
62 if (iRICH) new AliRICHDigitizer(manager);
66 manager->Exec("deb all");