]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ZDC/AliZDCMerger.h
Event merging for ZDC
[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;
12class AliZDCDigit;
13
14typedef enum {kDigitize=0, kMerge=1} MergeMode_t;
15
16class AliZDCMerger{
17
18public:
19 AliZDCMerger();
20 virtual ~AliZDCMerger();
21
22 void InitMerging();
23 void Background(Float_t &b, Int_t &nspecn, Int_t &nspecp);
24 void Fragmentation(Float_t b, Int_t nspecn, Int_t nspecp,
25 Int_t &nfreespn, Int_t &nfreespp);
26 void Mixing(Int_t nfreespn, Int_t nfreespp);
27 void ExtractSignal(Int_t detector, Int_t quadrant, Float_t &quadLight,
28 Float_t &comLight);
29// void MergeHit(Int_t track, Int_t *vol, Float_t *hits);
30
31 void Digitize();
32 Int_t Phe2ADCch(Int_t Detector, Int_t Quadrant, Int_t Light);
33 Int_t AddPedestal();
34
35 // Setters
36 void SetBackgroundFileName(char* file) {fFnBgr = file;}
37 void SetMode(MergeMode_t mode) {fMerge = mode;}
38
39private:
40 //Open the background file
41 TFile *OpenBgrFile();
42
43protected:
44 MergeMode_t fMerge; // Merging type kDigitize, kMerge
45
46 // Background event
47 Int_t fNEvBgr; // Number of events in the background file
48 char *fFnBgr; // Background file name
49 TFile *fBgrFile; // Pointer to background file
50 TTree *fTrHBgr; // Hits tree for background event
51 TTree *fTrSDBgr; // SDigits tree for background event
52 Float_t fImpPar; // Impact Parameter of the collision
53 Int_t fSpecn; // Number of spectator n
54 Int_t fSpecp; // Number of spectator p
55 TClonesArray *fHitsBgr; // TClonesArray of background hits
56
57 // Signal events
58 Int_t fFreeSpn; // Signal event number x spectator n
59 Int_t fFreeSpp; // Signal event number x spectator p
60
61 // File containing hit histograms for spectators
62 char *fFnSpecn; // Spectator n file name
63 TFile *fSpecnFile; // Pointer to signal file -> spectator n
64 char *fFnSpecp; // Spectator p file name
65 TFile *fSpecpFile; // Pointer to signal file -> spectator p
66 Float_t fQuadLight; // Light produced in tower PM
67 Float_t fComLight; // Light produced in common PM
68
69 Int_t fTrack;
70
71// // *** Digits
72// // --- Digitization parameters setters and getters
73// // PM gain
74// void SetPMGain(Int_t Det, Int_t PMDet, Int_t PMGain)
75// {fPMGain[Det][PMDet] = PMGain;}
76// Float_t GetPMGain(Int_t Det, Int_t PMDet)
77// {return fPMGain[Det][PMDet];}
78// // Conversion factor from charge to ADC channels
79// // F = 1.6E-19 / Resolution [Coulomb/ch]
80// void SetADCRes(Int_t ADCRes) {fADCRes = ADCRes;}
81// Float_t GetADCRes() {return fADCRes;}
82//
83// // --- Parameters for conversion of light yield in ADC channels
84// Float_t fPMGain[3][5]; // PM gain
85// Float_t fADCRes; // ADC conversion factor
86
87
88 ClassDef(AliZDCMerger,0)
89};
90#endif