Correct overloading of virtual functions in the derived classes (icc)
[u/mrichter/AliRoot.git] / ZDC / AliZDCMerger.h
CommitLineData
359cdddc 1#ifndef ALIZDCMERGER_H
2#define ALIZDCMERGER_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6////////////////////////////////////////////////
7// Merger class for ZDC //
8////////////////////////////////////////////////
9
10class AliZDC;
11class AliZDCHit;
1acbaaa8 12class AliZDCMergedHit;
359cdddc 13class AliZDCDigit;
14
15typedef enum {kDigitize=0, kMerge=1} MergeMode_t;
16
17class AliZDCMerger{
18
19public:
20 AliZDCMerger();
21 virtual ~AliZDCMerger();
22
23 void InitMerging();
24 void Background(Float_t &b, Int_t &nspecn, Int_t &nspecp);
25 void Fragmentation(Float_t b, Int_t nspecn, Int_t nspecp,
26 Int_t &nfreespn, Int_t &nfreespp);
1acbaaa8 27 void Mixing();
28 void ExtractSignal(Int_t SpecType);
359cdddc 29
1acbaaa8 30 // Inline functions to return TCA of MergerHits to Hits2SDigits()
31 TClonesArray *MergedHits() const {return fMHits;}
32 int GetNMhits() const {return fNMhits;}
33
34 // Inline function to return background file Hits2SDigits()
35 TFile *BgrFile() const {return fBgrFile;}
36
37 // Inline function to return event number
38 Int_t EvNum() const {return fNEvBgr;}
39
359cdddc 40 // Setters
359cdddc 41 void SetMode(MergeMode_t mode) {fMerge = mode;}
1acbaaa8 42 void SetBackgroundFileName(char* file) {fFnBgr = file;}
43 void SetBackgroundEventNum(Int_t nev) {fNEvBgr = nev;}
44
359cdddc 45 //Open the background file
46 TFile *OpenBgrFile();
47
48protected:
49 MergeMode_t fMerge; // Merging type kDigitize, kMerge
50
51 // Background event
359cdddc 52 char *fFnBgr; // Background file name
53 TFile *fBgrFile; // Pointer to background file
1acbaaa8 54 Int_t fNEvBgr; // Number of events in background file
359cdddc 55 TTree *fTrHBgr; // Hits tree for background event
1acbaaa8 56 TClonesArray *fHitsBgr; // TClonesArray of background hits
359cdddc 57 Float_t fImpPar; // Impact Parameter of the collision
58 Int_t fSpecn; // Number of spectator n
59 Int_t fSpecp; // Number of spectator p
359cdddc 60
61 // Signal events
62 Int_t fFreeSpn; // Signal event number x spectator n
63 Int_t fFreeSpp; // Signal event number x spectator p
1acbaaa8 64
88cb7938 65 char *fFnSpecn; // Spectator n file name
359cdddc 66 TFile *fSpecnFile; // Pointer to signal file -> spectator n
67 char *fFnSpecp; // Spectator p file name
68 TFile *fSpecpFile; // Pointer to signal file -> spectator p
359cdddc 69
1acbaaa8 70 Int_t fNMhits; // Number of Merged hits for background
71 TClonesArray *fMHits; // TCA for "merged" hits
1450a7cd 72
73public:
74 // *** Digits
75 // --- Parameters for conversion of light yield in ADC channels
76 Float_t fPMGain[3][5]; // PM gain
77 Float_t fADCRes; // ADC conversion factor
78 // --- Digitization parameters setters and getters
79 // PM gain
80 void SetPMGain(Int_t Det, Int_t PMDet, Int_t PMGain)
81 {fPMGain[Det][PMDet] = PMGain;}
82 Float_t GetPMGain(Int_t Det, Int_t PMDet)
83 {return fPMGain[Det][PMDet];}
84 // Conversion factor from charge to ADC channels
85 // F = 1.6E-19 / Resolution [Coulomb/ch]
86 void SetADCRes(Int_t ADCRes) {fADCRes = ADCRes;}
87 Float_t GetADCRes() {return fADCRes;}
88
359cdddc 89
90
1450a7cd 91 ClassDef(AliZDCMerger,1)
359cdddc 92};
93#endif