]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PMD/AliPMDDigitizer.h
378edae2b415ac505b0606df251d08a615c4dbf2
[u/mrichter/AliRoot.git] / PMD / AliPMDDigitizer.h
1 #ifndef ALIPMDDIGITIZER_H
2 #define ALIPMDDIGITIZER_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5 //-----------------------------------------------------//
6 //                                                     //
7 //  Header File : PMDDigitization.h, Version 00        //
8 //                                                     //
9 //  Date   : September 20 2002                         //
10 //                                                     //
11 //-----------------------------------------------------//
12
13 #include <TObjArray.h>
14
15 #include "AliDigitizer.h"
16
17 class TClonesArray;
18 class TFile;
19 class TMath;
20 class TObjArray;
21 class TParticle;
22 class TTree;
23 class TNtuple;
24
25 class AliLoader;
26 class AliRunLoader;
27 class AliRun;
28 class AliDetector;
29 class AliPMDhit;
30 class AliHit;
31 class AliHeader;
32 class AliRunDigitizer;
33
34 class AliPMDcell;
35 class AliPMDsdigit;
36 class AliPMDdigit;
37
38 class AliPMDDigitizer:public AliDigitizer
39 {
40  public:
41
42   AliPMDDigitizer();
43   AliPMDDigitizer(AliRunDigitizer *manager);
44   virtual ~AliPMDDigitizer();
45
46   void OpengAliceFile(const char *file, Option_t *option);
47
48   void Hits2SDigits(Int_t ievt);
49   void Hits2Digits(Int_t ievt);
50   void SDigits2Digits(Int_t ievt);
51   void Exec(Option_t *option);
52   void MergeSDigits(Int_t filenumber, Int_t troffset);
53   void TrackAssignment2Cell();
54   void MeV2ADC(Float_t mev, Float_t & adc) const;
55   void AddSDigit(Int_t trnumber, Int_t det, Int_t smnumber, 
56                  Int_t irow, Int_t icol, Float_t adc);
57   void AddDigit(Int_t trnumber, Int_t det, Int_t smnumber, 
58                 Int_t irow, Int_t icol, Float_t adc);
59   void  SetZPosition(Float_t zpos);
60   Float_t GetZPosition() const;
61   void ResetCell();
62   void ResetSDigit();
63   void ResetDigit();
64   void ResetCellADC();
65   void UnLoad(Option_t * option);
66
67  protected:
68   AliRunLoader *fRunLoader;  //! Pointer to Run Loader
69   AliPMDhit    *fPMDHit;     //! Pointer to specific detector hits
70   AliDetector  *fPMD;        //! Get pointers to Alice detectors 
71                              // and Hits containers 
72   AliLoader    *fPMDLoader;  //! Pointer to specific detector loader
73
74   TClonesArray *fSDigits;    //! List of summable digits
75   TClonesArray *fDigits;     //! List of digits
76
77   TObjArray     fCell;       //! List of pmd cells
78
79   Int_t   fDebug;            // Debug switch
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,4)    // To digitize PMD Hits
97 };
98 #endif
99