PMD digitization program
[u/mrichter/AliRoot.git] / PMD / AliPMDDigitizer.h
CommitLineData
b2b13ee2 1#ifndef PMDDigitizer_H
2#define PMDDigitizer_H
3//-----------------------------------------------------//
4// //
5// Header File : PMDDigitization.h, Version 00 //
6// //
7// Date : September 20 2002 //
8// //
9//-----------------------------------------------------//
10
11#include <Riostream.h>
12#include <stdlib.h>
13#include <math.h>
14#include <TMath.h>
15#include <vector>
16#include <algorithm>
17
18class TClonesArray;
19class TFile;
20
21class TObjArray;
22class TParticle;
23class TTree;
24class TNtuple;
25
26class AliLoader;
27class AliRunLoader;
28class AliRun;
29class AliDetector;
30class AliPMDhit;
31class AliHit;
32class AliHeader;
33
34class AliPMDcell;
35class AliPMDsdigit;
36class AliPMDdigit;
37class AliPMDClustering;
38class AliPMDContainer;
39class AliPMDrecpoint;
40
41using namespace std;
42
43class AliPMDDigitizer
44{
45 protected:
46 AliRunLoader *fRunLoader;
47 AliRun *gAlice;
48 AliPMDhit *pmdHit; /* Pointer to specific detector hits. */
49 AliDetector *PMD; /* Get pointers to Alice detectors
50 and Hits containers */
51 AliLoader *pmdloader;
52
53 TClonesArray *PMDhits;
54 TObjArray *Particles;
55 TParticle *particle;
56
57 TTree *treeH;
58 TTree *treeS;
59 TTree *treeD;
60 TTree *treeR;
61
62 TClonesArray *fSDigits;
63 TClonesArray *fDigits;
64 TClonesArray *fRecpoints;
65
66 TObjArray *fCell;
67 AliPMDcell *pmdcell;
68 vector<int> vjunkTRN;
69
70 Int_t fNsdigit;
71 Int_t fNdigit;
72 Int_t fDetNo;
73 Float_t fZPos;
74
75 static const Int_t fTotSM = 27;
76 static const Int_t fNCell = 72;
77 Float_t fCPV[fTotSM][fNCell][fNCell];
78 Float_t fPMD[fTotSM][fNCell][fNCell];
79 Int_t fPMDCounter[fTotSM][fNCell][fNCell];
80 Int_t fPMDTrackNo[fTotSM][fNCell][fNCell];
81 Int_t fCPVTrackNo[fTotSM][fNCell][fNCell];
82
83 public:
84
85 AliPMDDigitizer();
86 virtual ~AliPMDDigitizer();
87
88 void OpengAliceFile(char * /* galice.root */, Option_t * /* option */);
89
90 void Hits2SDigits(Int_t /* ievt */);
91 void Hits2Digits(Int_t /* ievt */);
92 void SDigits2Digits(Int_t /* ievt */);
93 void TrackAssignment2Cell();
94 void MeV2ADC(Float_t /* mev */, Float_t & /* adc */);
95 void AddSDigit(Int_t /* trnumber */, Int_t /* det */, Int_t /* smnumber */,
96 Int_t /* cellnumber */, Float_t /* adc */);
97 void AddDigit(Int_t /* trnumber */, Int_t /* det */, Int_t /* smnumber */,
98 Int_t /* cellnumber */, Float_t /* adc */);
99 Int_t Convert2RealSMNumber(Int_t /* smnumber1 */ );
100 void SetZPosition(Float_t /* zpos */);
101 Float_t GetZPosition() const;
102 void ResetCell();
103 void ResetSDigit();
104 void ResetDigit();
105 void ResetCellADC();
106 void UnLoad(Option_t * /* option */);
107
108 ClassDef(AliPMDDigitizer,1)
109};
110#endif
111