]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PMD/AliPMDDigitizer.h
15041a23b91321be6a45f51c788e40c2323e03c1
[u/mrichter/AliRoot.git] / PMD / AliPMDDigitizer.h
1 #ifndef ALIPMDDIGITIZER_H
2 #define ALIPMDDIGITIZER_H
3 //-----------------------------------------------------//
4 //                                                     //
5 //  Header File : PMDDigitization.h, Version 00        //
6 //                                                     //
7 //  Date   : September 20 2002                         //
8 //                                                     //
9 //-----------------------------------------------------//
10
11 class TClonesArray;
12 class TFile;
13 class TMath;
14 class TObjArray;
15 class TParticle;
16 class TTree;
17 class TNtuple;
18
19 class AliLoader;
20 class AliRunLoader;
21 class AliRun;
22 class AliDetector;
23 class AliPMDhit;
24 class AliHit;
25 class AliHeader;
26
27 class AliPMDcell;
28 class AliPMDsdigit;
29 class AliPMDdigit;
30 class AliPMDClustering;
31
32 class AliPMDDigitizer
33 {
34  public:
35
36   AliPMDDigitizer();
37   virtual ~AliPMDDigitizer();
38
39   void OpengAliceFile(char *file, Option_t *option);
40
41   void Hits2SDigits(Int_t ievt);
42   void Hits2Digits(Int_t ievt);
43   void SDigits2Digits(Int_t ievt);
44   void TrackAssignment2Cell();
45   void MeV2ADC(Float_t mev, Float_t & adc);
46   void AddSDigit(Int_t trnumber, Int_t det, Int_t smnumber, 
47                  Int_t cellnumber, Float_t adc);
48   void AddDigit(Int_t trnumber, Int_t det, Int_t smnumber, 
49                 Int_t cellnumber, Float_t adc);
50   void  SetZPosition(Float_t zpos);
51   Float_t GetZPosition() const;
52   void ResetCell();
53   void ResetSDigit();
54   void ResetDigit();
55   void ResetCellADC();
56   void UnLoad(Option_t * /* option */);
57
58  protected:
59   AliRunLoader *fRunLoader;  // Pointer to Run Loader
60   AliRun       *fAlice;      // Pointer to a Run
61   AliPMDhit    *fPMDHit;     // Pointer to specific detector hits
62   AliDetector  *fPMD;        // Get pointers to Alice detectors 
63                              // and Hits containers 
64   AliLoader    *fPMDLoader;  // Pointer to specific detector loader
65
66   TClonesArray *fHits;       // Pointer to hits array
67   TObjArray    *fPArray;     // Pointer to particle array
68   TParticle    *fParticle;   // Pointer to a given particle
69
70   TTree        *fTreeH;      // Hits tree
71   TTree        *fTreeS;      // Summable Digits tree
72   TTree        *fTreeD;      // Digits tree
73
74   TClonesArray *fSDigits;    // List of summable digits
75   TClonesArray *fDigits;     // List of digits
76
77   TObjArray    *fCell;       // List of pmd cells
78   AliPMDcell   *fPMDcell;    // Pointer to a PMD cell
79
80   Int_t   fNsdigit;          // Summable digits counter
81   Int_t   fNdigit;           // Digits counter
82   Int_t   fDetNo;            // Detector Number (0:PRE, 1:CPV)
83   Float_t fZPos;             // z-position of the detector
84
85   static const Int_t fgkTotUM = 24; // Total Unit modules in one detector
86   static const Int_t fgkRow   = 48; // Total number of rows in one unitmodule
87   static const Int_t fgkCol   = 96; // Total number of cols in one unitmodule
88   Float_t fCPV[fgkTotUM][fgkRow][fgkCol]; // CPV Array containing total edep
89   Float_t fPRE[fgkTotUM][fgkRow][fgkCol]; // PRE Array containing total edep
90   Int_t   fPRECounter[fgkTotUM][fgkRow][fgkCol]; // Number of times each cell
91                                                  // is fired in PMD
92   Int_t   fPRETrackNo[fgkTotUM][fgkRow][fgkCol]; // PRE Array containing track number
93   Int_t   fCPVTrackNo[fgkTotUM][fgkRow][fgkCol]; // CPV Array containing track number
94
95
96   ClassDef(AliPMDDigitizer,2)    // To digitize PMD Hits
97 };
98 #endif
99