]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PMD/AliPMDDigitizer.h
PMD digitization program
[u/mrichter/AliRoot.git] / PMD / AliPMDDigitizer.h
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
18 class TClonesArray;
19 class TFile;
20
21 class TObjArray;
22 class TParticle;
23 class TTree;
24 class TNtuple;
25
26 class AliLoader;
27 class AliRunLoader;
28 class AliRun;
29 class AliDetector;
30 class AliPMDhit;
31 class AliHit;
32 class AliHeader;
33
34 class AliPMDcell;
35 class AliPMDsdigit;
36 class AliPMDdigit;
37 class AliPMDClustering;
38 class AliPMDContainer;
39 class AliPMDrecpoint;
40
41 using namespace std;
42
43 class 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