Last minute changes and new code for event mixing and reconstruction (A.Maevskaia)
[u/mrichter/AliRoot.git] / FMD / AliFMDMerger.h
CommitLineData
dc8af42e 1#ifndef ALIFMDMERGER_H
2#define ALIFMDMERGER_H
3/* Copyright(c) 1998-2000, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6// #include "AliMerger.h"
7// #include "AliMergable.h"
8#include "TRandom.h"
9#include "AliDetector.h"
10
11typedef enum {kDigitize=0, kMerge = 1} MergeMode_t;
12
13class AliFMDMerger {
14 public:
15
16 AliFMDMerger();
17 virtual ~AliFMDMerger();
18
19
20 // Initialize merging and digitisation
21 virtual void Init();
22
23 // Do the main work
24 void Digitise() ;
25 Int_t PutNoise(Int_t charge){return (Int_t)(gRandom->Gaus(charge,500));}
26 TClonesArray *SDigits() const {return fSDigits;}
27 // TClonesArray *Digits() const {return fDigits;}
28
29 void ReadDigit(Int_t a[][20][150], Int_t);
30
31 // Setters -> Later Communication with gAlice
32 void SetSignalEventNumber(Int_t i) {fEvNrSig = i;}
33 void SetBackgroundEventNumber(Int_t i) {fEvNrBgr = i;}
34 void SetBackgroundFileName(char* file) {fFnBgr = file;}
35 void SetSignalFileName(char* file) {fFnSig = file;}
36 void SetMode(MergeMode_t mode) {fMerge = mode;}
37
38 enum {kBgTag = -1};
39
40 private:
41 // Open the bgr file
42 TFile *InitBgr();
43
44 private:
45 TClonesArray *fDigits; // ! array with digits
46 // Int_t fDigits;
47 TClonesArray *fSDigits ; // List of summable digits
48 Int_t fEvNrSig; // signal event number
49 Int_t fEvNrBgr; // background event number
50 MergeMode_t fMerge; // merging type kDigitize, kMerge
51 char *fFnBgr; // background file name
52 char *fFnSig; // signal file name
53 TFile *fBgrFile; // Pointer to background file
54
55 ClassDef(AliFMDMerger,0)
56};
57#endif
58