]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PMD/AliPMDDigitizer.h
Fixes, new methods (Markus)
[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 // Author - B.K. Nandi
13 //
14
15 #include "AliDigitizer.h"
16
17 class TClonesArray;
18 class TFile;
19 class TObjArray;
20 class TParticle;
21 class TTree;
22 class TNtuple;
23
24 class AliLoader;
25 class AliRunLoader;
26 class AliRun;
27 class AliDetector;
28 class AliPMDhit;
29 class AliHit;
30 class AliHeader;
31 class AliRunDigitizer;
32 class AliCDBManager;
33 class AliCDBStorage;
34
35 class AliPMDcell;
36 class AliPMDsdigit;
37 class AliPMDdigit;
38 class AliPMDCalibData;
39
40 class AliPMDDigitizer:public AliDigitizer
41 {
42  public:
43
44   AliPMDDigitizer();
45   AliPMDDigitizer(const AliPMDDigitizer &digitizer);  // copy constructor
46   AliPMDDigitizer &operator=(const AliPMDDigitizer &digitizer); // assign op
47   AliPMDDigitizer(AliRunDigitizer *manager);
48   virtual ~AliPMDDigitizer();
49
50   void OpengAliceFile(const char *file, Option_t *option);
51
52   void Hits2SDigits(Int_t ievt);
53   void Hits2Digits(Int_t ievt);
54   void SDigits2Digits(Int_t ievt);
55   void Exec(Option_t *option);
56   void MergeSDigits(Int_t filenumber, Int_t troffset);
57   void TrackAssignment2Cell();
58   void MeV2ADC(Float_t mev, Float_t & adc) const;
59   void AddSDigit(Int_t trnumber, Int_t det, Int_t smnumber, 
60                  Int_t irow, Int_t icol, Float_t adc);
61   void AddDigit(Int_t trnumber, Int_t det, Int_t smnumber, 
62                 Int_t irow, Int_t icol, Float_t adc);
63   void  SetZPosition(Float_t zpos);
64   Float_t GetZPosition() const;
65   void ResetCell();
66   void ResetSDigit();
67   void ResetDigit();
68   void ResetCellADC();
69   void UnLoad(Option_t * option);
70
71   Float_t  Gain(Int_t det, Int_t smn, Int_t row, Int_t col) const;
72
73   AliPMDCalibData *GetCalibData() const;
74
75  protected:
76   AliRunLoader *fRunLoader;  //! Pointer to Run Loader
77   AliPMDhit    *fPMDHit;     //! Pointer to specific detector hits
78   AliDetector  *fPMD;        //! Get pointers to Alice detectors 
79                              // and Hits containers 
80   AliLoader    *fPMDLoader;  //! Pointer to specific detector loader
81
82   AliPMDCalibData *fCalibData;  //! calibration data
83
84   TClonesArray *fSDigits;    //! List of summable digits
85   TClonesArray *fDigits;     //! List of digits
86
87   TObjArray     fCell;       //! List of pmd cells
88
89   Int_t   fNsdigit;          // Summable digits counter
90   Int_t   fNdigit;           // Digits counter
91   Int_t   fDetNo;            // Detector Number (0:PRE, 1:CPV)
92   Float_t fZPos;             // z-position of the detector
93
94   static const Int_t fgkTotUM = 24; // Total Unit modules in one detector
95   static const Int_t fgkRow   = 48; // Total number of rows in one unitmodule
96   static const Int_t fgkCol   = 96; // Total number of cols in one unitmodule
97   Float_t fCPV[fgkTotUM][fgkRow][fgkCol]; //! CPV Array containing total edep
98   Float_t fPRE[fgkTotUM][fgkRow][fgkCol]; //! PRE Array containing total edep
99   Int_t   fPRECounter[fgkTotUM][fgkRow][fgkCol]; //! Number of times each cell
100                                                  // is fired in PMD
101   Int_t   fPRETrackNo[fgkTotUM][fgkRow][fgkCol]; //! PRE Array containing track number
102   Int_t   fCPVTrackNo[fgkTotUM][fgkRow][fgkCol]; //! CPV Array containing track number
103
104
105   ClassDef(AliPMDDigitizer,6)    // To digitize PMD Hits
106 };
107 #endif
108